-
Notifications
You must be signed in to change notification settings - Fork 304
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
Remote Container with WSL 2 support activated: Git credentials not available #2858
Comments
Honestly, I solved almost all cross VM / Host configuration issues using big hammer method: |
I encounter the same problem, in the same conditions except that I am on a public Github repo. |
@J0F3 Could you retry with current VS Code Insiders (https://code.visualstudio.com/insiders/) and Remote-Containers 0.113.0? |
@chrmarti Works for me with VS Code Insiders and Remote-Containers 0.113.0. |
@chrmarti Unfortunately still the same for me with VS Code Insiders (just updated today) and Remote-Containers 0.113.0.
And on the terminal I have the following error:
I have tried with a Repo on GitHub and on GitLab. |
@J0F3 Is there anything in the dev console? ( |
@chrmarti Not really more than what is in the Dev Container Log: -1588228884901.log It is really strange. Just noticed that with a GitHub Repo I have the same error messages but pushing and pulling from this repo works as expected (no credential prompts). But with a (private) GitLab Repo it does always show the credential prompts. (not in WSL 2 though). Does it maybe matter when I have also the stable version of VS Code installed in parallel? Because on anther computer both works. But there I have only the VS Code insiders and a slightly newer Windows Build installed (because it is on the Insider Fast Ring). @cailloumajor What Windows Build do you have installed? |
@J0F3 I think VS Code Insiders adds GitHub auth support, so when the Git credentials cannot be fetched from the Windows / WSL side, it will ask you to sign in via GitHub. Can you run |
@chrmarti Ah yes, this would example the difference between the GitHub and GitLab Repo. Yes, |
@J0F3 I would expect that to work. I'm fixing the |
@chrmarti Sounds, good. Just let me know if I should test anything further. |
@J0F3 Could you retry with Remote-Containers 0.114.0 in VS Code Insiders? That should hopefully give a better error message (either in the containers log or the dev console). |
Hi, @chrmarti Please check what is your environment in the remote container. When I run it manually it contains nothing related to git |
Git documentation says that Git expects a lot: GitEnvVariables |
@chrmarti Thx. I just tried again with Remote-Containers 0.114.0 in VS Code Insiders. But unfortunately no other error messages. The only error I get is In addition to that I have to correct my self. I mentioned above that it would work on my other laptop. But that was actually not true. (I accidentally tested with a repo cloned in Windows instead in the WSL distro). It does not work on both of my computers. But on the second computer I get a slightly different error message: Furthermore I tested now also with SSH Auth but that does not work either. Then the my SSH key is not found an Let me know if I can do anything more. |
@chrmarti Why did you closed that now? Could you fix it? I think the authentication with credentials / credential helper for repos cloned via HTTPS and authentication via SSH keys for repos cloned via SSH are two things. So the new issues for SSH makes perfectly sense for me. But this one here should also be stay open as the problem with the credential helper for HTTPS repos is still a problem which still should be fixed. Right? 🤓😉 |
@J0F3 I have a fix queued for the upcoming 0.115.0 release. I have closed the issue for my own book-keeping, that is necessarily a little earlier than you can test the fix. Will let you know when the new version is out. |
@chrmarti Ah cool! Good to hear that. Looking forward to test it. 😊 Thanks! |
@J0F3 0.115.0 is out. Could you give that a try? |
@chrmarti Awesome, it works! So I would say it is fixed! 😁👍 Thanks a lot! |
Great, thanks @J0F3 ! |
Steps to Reproduce:
So it is basically what is described in the last section ("Check that Git credentials are forwarded from the WSL distro:") in #2849 which does not work for me with the activated experimental WSL support of the Remote - Container extension.
I tested the same also using SSH and SSH Agent configured in WSL. But the result/problem is the same.
Interesting is that when the container is started once with "remote.containers.experimentalWSL" set to "ture" and then the setting is changed to "false" the container can reopened again and then git pull works as expected. (Git credential manager gets used and no questions about username and password).
Git config in WSL 2 / Ubuntu:
Git config in Remote Container:
Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: No
As the feature is described as experimental I am not sure if this is actually a bug or if it is a known issue/restriction. But I thought I would be worth to post it here to clear things up. 😉
Thanks!
Jonas
The text was updated successfully, but these errors were encountered: