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

added in attribute value start with { application-secret.yml not able to encrypted #1702

Open
deepakpanda20 opened this issue Dec 13, 2024 · 3 comments

Comments

@deepakpanda20
Copy link

hi team, there some pwd properties value which start with { character sample Example is {Abs2kd3 getting below error

C:\ACO_DEEPAK\dev\aco-listing-prep\deployment-configuration\profiles\dev>C:\Users\DEEPAK\sops-v3.7.2.exe application.secrets.yaml
[CMD] time="2024-12-13T22:01:45+05:30" level=error msg="Could not load tree, probably due to invalid syntax. Press a key to return to the editor, or Ctrl+C to exit." error="Error unmarshaling input YAML: yaml: line 6: did not find expected ',' or '}'"

while remove { character form password properties then able to generate file could you please help here how it will generate the encrypted file.

application-secret yaml file
SAMPLE_NAME: {ABS22CD // not able to encrypted getting error
SAMPLE_NAME: ABS22CD // successfully encrypted no error

@felixfontein
Copy link
Contributor

The following is invalid YAML:

SAMPLE_NAME: {ABS22CD

The { indicates that an inline dictionary is starting. Since you want this to be a string, you should either use quotes or other string indications (see for example https://yaml-multiline.info/), like this:

SAMPLE_NAME_1: "{ABS22CD"
SAMPLE_NAME_2: '{ABS22CD'
SAMPLE_NAME_3: >-
  {ABS22CD

@deepakpanda20
Copy link
Author

deepakpanda20 commented Dec 15, 2024

still not working passward value is {ABS22CD while adding double quote this value thne it looklike '{ABS22CD' thn my password value is {ABS22CD or '{ABS22CD' which value will take
suggest me what to do(url)

they provided the information value is : {ABS22CD
SAMPLE_NAME_1: "{ABS22CD" after adding "" then value decrypted value belwo
SAMPLE_NAME_1: '{ABS22CD' is it will validate as value {ABS22CD .

@felixfontein
Copy link
Contributor

I think you need to understand how YAML works first. The specification can be found at https://yaml.org/, which is definitely not the best place, but there should be many other resources on the internet that explain how strings can be encoded in YAML.

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

2 participants