Skip to content

Fixing YAML block scalar when providing sshKey for git-sync #56706

@RobinM-code

Description

@RobinM-code

What do you see as an issue?

Here https://github.com/apache/airflow/blob/main/chart/values.yaml#L3053 is explained how to provide an ssh-key for git-sync.

However, when doing so, the git-sync init container failed due to: error in libcrypto

When git-sync runs git fetch it loads the private ssh-key from /etc/git-secret/ssh.
Here it gets the error in libcrypto and therefore git fetch fails with permission denied.

Solving the problem

# sshKey: |-
Should be changed to:
# sshKey: |

YAML block scalar |- will strip any final empty newline after the last line. This results in a ssh-key that can not be read by libcrypto.
YAML block scalar | will preserve any final empty newline after the last line. This makes sure the ssh-key can be read.

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions