-
Notifications
You must be signed in to change notification settings - Fork 302
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
Git credentials and SSH agent not forwarded when connected through SSH #5977
Comments
/fyi @felipecrs for the SSH agent forwarding. |
The same is happening for me when using Remote SSH into any Linux system. I need to set |
@zweiter This is about the Remote-Containers extension. Could you open a new issue for the problem with Remote-SSH? |
Hey @chrmarti, I think you hit "Close" by mistake. |
I have an update on this. I have been experimenting some more and I have managed to somehow get git credentials to pass through. For one project I was testing it wasn't working and for another one it mysteriously appears to be working. I can't figure out the mechanics of it, but here is what I see: I had an initial repo I was working on and to get things working, I installed the git credentials manager insider the devcontainer and that worked. Then I started a new repo and with its own devcontainer, that one seems to have picked up the settings from the other one....inside the second container, I get:
I am (almost) 100% sure I did not install anything in the second devcontainer to support this. |
It will use the SSH server's Git credential helper if there is one. I have a fix ready that will make it consult localhost's credential helper if the one on the SSH server fails. Similarly for the ssh-agent, if the SSH server does not have SSH_AUTH_SOCK set, the fix will check for it on localhost. |
I'm in the same situation. Scenario 1: Scenario 2: Is there any workaround to be able to forward de GCM to the Remote-SSH host? |
Created #6168 for @interpeix 's request. |
I have been doing some initial testing and things are mostly working for me. Really nice job on this. I have one issue with git credentials. When running a devcontainer locally it will pick up the git credentials from the local OS if a credentials manager is configured (https://code.visualstudio.com/docs/remote/containers#_using-a-credential-helper). That does not appear to be happening when opening the container from a remote SSH connection. @chrmarti, Any guidance on this?
Originally posted by @hansenms in #2994 (comment)
The text was updated successfully, but these errors were encountered: