dev-environments icon indicating copy to clipboard operation
dev-environments copied to clipboard

SSH Key is not being used to clone which makes the clone fails

Open Nordes opened this issue 3 years ago • 8 comments

Describe the bug I add the repo to clone (Dev Environment) using SSH as an url. When cloning it fails saying that the password is not being given. However, on my pc I have the key in my user directory and usually works without any issues.

The big point here is that the SSH Key is not being used to clone which makes the clone fails.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Docker'
  2. Click on 'Dev Environments'
  3. On top right, put a private git ssh repo.
  4. Click on Create
  5. Look at the message in the container.

Expected behavior I expect the clone to work

Screenshots image

Desktop (please complete the following information):

  • OS: Windows
  • Version Docker: 20.10.7

Additional context Add any other context about the problem here.

Nordes avatar Jul 14 '21 12:07 Nordes

Hi @Nordes,

Cloning over SSH only works if you have the SSH key loaded into the ssh-agent.

Could you try and add your key to the agent and re-clone?

rumpl avatar Jul 14 '21 12:07 rumpl

I have a similar issue. I'm on windows using GIT_SSH to set my ssh-agent to plink.exe, but docker is ignoring this and not using the private key.

zeroZshadow avatar Jul 23 '21 20:07 zeroZshadow

@zeroZshadow do you mean pageant?

Could you run this in a power shell [System.IO.Directory]::GetFiles("\\.\\pipe\\") and tell us if you see a pipe named openssh-ssh-agent please?

rumpl avatar Aug 10 '21 12:08 rumpl

Yes I do mean pageant.

I'm not seeing a pipe with this name while pageant is running.

zeroZshadow avatar Aug 10 '21 12:08 zeroZshadow

Thanks!

Do you see a pageant pipe in that command?

Do you happen to have the SSH_AUTH_SOCK environment variable set?

rumpl avatar Aug 10 '21 13:08 rumpl

I do see a pageant pipe, \\.\\pipe\\pageant.zeroZshadow.99eb623bb0fd37e43d14e4c4197b1c759ae8ee0614493180154c80cc4a40b293

I do not have SSH_AUTH_SOCK set.

zeroZshadow avatar Aug 10 '21 13:08 zeroZshadow

Great, @zeroZshadow I'll create a ticket in our internal issue tracker and we'll try to find a way for the clone over ssh to work when you have pageant.

Thanks, all this information is super useful for us ;)

rumpl avatar Aug 10 '21 13:08 rumpl

Thank you very much for all the work!

zeroZshadow avatar Aug 10 '21 13:08 zeroZshadow