-
Notifications
You must be signed in to change notification settings - Fork 534
SSH connection without SSH-agent #206
Comments
I have the same problem as @skyflyer (on linux where I don't want to use the ssh-agent but pass in a privatekey). |
Exactly the |
I've been trying to find a way to implement this and it seems tricky without changing the interfaces significantly. The general flow for The above flow works great because the initialization doesn't perform any network activity and it follows the I think the SSH transport needs to be broken out so that network connectivity happens during I'm keen to get this issue fixed (I've got a temporary hack locally because I need SSH keys). Happy to help with discussion / design / code if possible. |
This is fixed now, thanks to @amlweems! |
Minor changes
Uh oh!
There was an error while loading. Please reload this page.
I'm having an issue connecting to git repository over ssh on windows, where I don't have an SSH agent running.
In
ssh/common.go
, thecommand.connect
method callsc.setAuthFromEndpoint()
which in turn tries to connect with SSH agent and fails. The method's comments note:but for me, that does not work. Here is a brief program that reproduces this issue:
The error returned is
dial unix: missing address
, which is correct (in a way), since there is no SSH agent environment variable available, so there's nowhere to connect to. ThegetSigner
function above retrieves the ssh.Signer from a private key, supplied to the program.I can prepare a pull request with a fix, if you'd like that; it seems to me, that we would need to reorganise some code, as currently,
Auth
does not get propagated down to the actual transport layer.The text was updated successfully, but these errors were encountered: