-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Argo CD doesn't support a private key with passphrase #1894
Comments
Working on it |
@alexmt FYI: According to golang/go#18692, It seems difficult to fix this issue with only using As a workaround, some person suggested a 3rd party package for supporting |
As far as I investigated, a SSH private key generated by newer OpenSSH without $ ssh -V
OpenSSH_7.9p1, LibreSSL 2.7.3
$ ssh-keygen -t rsa -b 4096 -C "[email protected]" -f keytest.pem -m pem
# This keytest.pem with passphrase can be parsed by ssh.ParsePrivateKeyWithPassphrase function
$ ssh-keygen -t rsa -b 4096 -C "[email protected]" -f keytest2.pem
# This keytest2.pem with passphrase cannot be parsed by ssh.ParsePrivateKeyWithPassphrase function |
Thank you for the information, @takuan-osho ! I was waiting fo PR1807 to get merged before start working on this ticket. Will try to use your advice tomorrow and will update ticket with my findings. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I stumbled on that issue today. Any news on it? |
This probrems depends on Master branch has already depended on corrected
But, latest version ArgoCD v1.6.1 does not follow fixed version.
Maybe it will work correctly in the next release. |
The argocd codebase still uses the |
I am also stumbled on this issue today. Any news on it? |
any solution? ping the issue. |
I am still having this issue. Any news ? |
Any news on this front? Thanks! |
refer to the solution this week if I have time. |
I am wondering if there is any update on this? |
I would also like to know if there has been any progress? |
This is still a good addition that should be made to ArgoCD |
According to golang/go#18692, there might have been some progress in adding the support. We might want to revisit this. |
I still see Line 267 in e8d5265
I can try to fix this, but |
Describe the bug
I tried to add my private git repository to Argo CD with SSH private key credential.
However, Argo CD CLI invoked some error like this.
It seems that this
ssh: cannot decode encrypted private keys
came from golang.org/x/crypto/ssh package.golang/x/crypto/ssh package has a function for dealing with a private key with passphrase like this, but it seems that Argo CD codes don't use it.
To Reproduce
argocd repo add [email protected]:<my private repository> --ssh-private-key-path <path/to/the private key>
FATA[0000] ssh: cannot decode encrypted private keys
Expected behavior
Argo CD CLI add the git repository with no errors.
Version
Have you thought about contributing a fix yourself?
I tried to fix this issue, but code base of Argo CD is complicated for me.
The text was updated successfully, but these errors were encountered: