GitSync invalid key format in /etc/git-secret/ssh #43466
Replies: 5 comments 2 replies
-
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval. |
Beta Was this translation helpful? Give feedback.
-
This is not an airflow issue - you have some problem with format, but you should debug it. I suggest you login to the container and try regular git command in it and try to fix the problem (that's what I'd do at least). Also there are more issues in the log (permission denied) which is likey the root cause of the problem. It needs a bit of debugging that I think only you can do - so I convert it to discussion here - maybe someone else who made similar configuration problem will be able to help you in the discussion. |
Beta Was this translation helpful? Give feedback.
-
@potiuk thank you for your answer and indeed it is more of a discussion. Trust me I debugged it a lot before opening this, not in my attitude to throw to maintainers whatever issues we can have by using open source projects ;) Actually the thing is that I added to the secret the key |
Beta Was this translation helpful? Give feedback.
-
Hi, I wanted to chime in and say I'm experiencing the exact same problem. I verified my key format was not messed up by diffing the key that works on on my laptop locally with the one that the Helm chart mounted to I'm using the
Does anyone have any more ideas as to what could be causing this? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
-
Ok, I figured out what the issue was for me and posting in case it's the cause of anyone else's pain and suffering. TL;DR my secret which gets passed as the I'm using Terraform to pass values, and so I ended up doing the following which fixed it:
This formatting issue didn't come up in testing because when I copied the text out of the K8s volume and pasted it into my local machine's Vim, it automatically added the newline at EoF, because Vim. That created the illusion that there were no issues with the key being mounted in the container. |
Beta Was this translation helpful? Give feedback.
-
Official Helm Chart version
1.10.0
Apache Airflow version
2.6.2
Kubernetes Version
1.30
Helm Chart configuration
Docker Image customizations
No response
What happened
I have created a deploy ssh key in the repo to enable gitsync to only access this repo in particular with read only access. I generate a ssh key locally and updated the public key on the deploy key. The private key is stored in AWS secrets manager as a plain text file and I let external secret operator create a secret that by construction is base64 encoded and matches the format indicated by the documentation:
However I receive the error:
I have create d a debug pod with the secret mounted as it is on the airflow-worker pod and the pem file looks fine for me:
cat /etc/git-secret/ssh
What you think should happen instead
No response
How to reproduce
Deploy Airflow on kubernetes 1.30 and deploy the 1.10 airflow helm chart trying to connect using a deploy ssh key to the dag folder.
Anything else
No response
Are you willing to submit PR?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions