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
WSL2 Host - Sharing Git credentials with your container - ssh-agent not forwarding to remote correctly #6395
Comments
Could you post your log after you connected to the dev container? ( |
|
Enabling that gives this error when I rebuild:
I have the windows ssh-agent working correctly as well so I'm happy to forward either one. Which ever is simpler. |
Does |
I added my ssh key and it working correctly. I am able to use git correctly in my container. Thank you for your help. Do you know git worked in PowerShell without a key added? |
I guess your private key is unencrypted on disk, so Closing as resolved, thanks. |
@chrmarti I'm having a very similar error. My devcontainer used to work, but no longer does. It seems to have switched from getting its credentials from Windows instead of the WSL2. I don't really want to add my credentials to windows? How can I make my devcontainer work again with the credentials (ssh keys) from WSL2? Should I make a new issue? Thanks EDIT: Fixed it with a lot of weird hackery |
@shadycuz It should use the ssh-agent in WSL when there is one. |
Logs
Steps to Reproduce:
ssh-add -l
in the Container, response withThe agent has no identities.
Same symptoms as #5604 but the solution didn't work.
Here's is the current setup:
WSL2
~/.bash_profile contains:
eval $(keychain --eval)
$:ssh-add -l
returns my ssh key.$:ssh -T git@github.com
returns:Hi Archie-Elvie! You've successfully authenticated, but GitHub does not provide shell access.
$: ps ax | grep ssh-agent
returns a single ssh-agent process.Container
$:ssh-add -l
returns:The agent has no identities.
$:echo $SSH_AUTH_SOCK
returns:/tmp/vscode-ssh-auth-2db8e5f259970f6c563e109d26b0442bdd2c87bc.sock
ssh -T git@github.com
returns:git@github.com: Permission denied (publickey).
Let me know if you need more information.
The text was updated successfully, but these errors were encountered: