Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File contents with multiple hyphens break YAML parser #50

Open
DavidWittman opened this issue Dec 11, 2018 · 1 comment
Open

File contents with multiple hyphens break YAML parser #50

DavidWittman opened this issue Dec 11, 2018 · 1 comment

Comments

@DavidWittman
Copy link

DavidWittman commented Dec 11, 2018

I include some RSA keys in a few of my services, and I have found that they break the YAML parser when trying to use them with Replicated Studio.

Here's an example:

        config_files:
          - filename: /keys/key.pem
            file_mode: '0400'
            contents: |
                -----BEGIN PUBLIC KEY-----
                keystuff
                -----END PUBLIC KEY-----

Causes the following error in the studio container:

Failure parsing YAML file replicated/current.yaml:
YAMLException: end of the stream or a document separator is expected at line 12, column 7:
          - source: dockerhub
          ^
@DavidWittman
Copy link
Author

I was able to work around this by supplying the key in a single line instead of a multi-line string, e.g.:

contents: "-----BEGIN PUBLIC KEY-----\nkeystuff\n-----END PUBLIC KEY-----"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant