-
Notifications
You must be signed in to change notification settings - Fork 94
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
SSH: invalid privatekey when key has a passphrase #68
Comments
Not sure I'm entirely following your situation. Are you saying the issue is that it's picking up your keys from If those questions seem to be missing the point, could you provide some more clarification? |
Hi, thanks for getting back to me. That's right, it's picking up the key from I've been running with The point is that it can work without providing credentials if it uses the sshagent. I verified this by debugging on this line and skipping the Cheers. |
Can you provide a debug log for one of your failing builds? I'd like to see what, if any, of the messages from my code show up. As default behavior, I think it should still be looking at those keys, just trying to determine what the proper workaround is for people in your situation. |
Sure, here you are:
|
Hi, I know this is a horrible hack, but is working for me in the mean time: Cheers, |
Yeah, I'd like to have something a little cleaner than that, but it's at least something to reference. I haven't had a chance to think too much about the solution yet, but I would like to fix this. |
I tried to move back to your version by there is a case-mismatch in the method so it fails. -createDefaultJsch
+createDefaultJSch Could you make this change? Thanks, |
Just as an information for others: There was no log output about the invalid known_hosts file, but cleaning it solved the issue. The only output was:
|
When using an ssh repo, remote commands fail with:
I have narrowed this down to here where it is trying to add an identity based on the provided host-config but the identity key has a passphrase:
http://grepcode.com/file/repo1.maven.org/maven2/org.eclipse.jgit/org.eclipse.jgit/3.7.0.201502260915-r/org/eclipse/jgit/transport/JschConfigSessionFactory.java#261
This usage is called from:
grgit/src/main/groovy/org/ajoberstar/grgit/auth/JschAgentProxySessionFactory.groovy
Line 64 in f3e32ce
If instead of calling the super method, a default JSch is used as such:
jsch = new JSch(); jsch.setHostKeyRepository(defaultJSch.getHostKeyRepository());
...then the code continues down the path of using the ssh-agent and succeeds.
Hope you can help with this.
The text was updated successfully, but these errors were encountered: