Repository navigation
Open
Description
Issue Type: Bug
I try to do Git Pull from VSCode and it hands indefinitely. I'm using Git on WSL.
I assume there's an issue with SSH keys since that happens when I renamed the key from id_xxx to id_rsa in the ~/.ssh folder. When it had a custom name, the issue was: [email protected]: Permission denied (publickey).
Git in the WSL itself works perfectly but not from VSCode.
Extension version: 0.38.10
VS Code version: Code 1.36.1 (2213894ea0415ee8c85c5eea0d0ff81ecc191529, 2019-07-08T22:59:35.033Z)
OS version: Windows_NT x64 10.0.18936
Remote OS version: Linux x64 4.19.43-microsoft-standard
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz (8 x 2112) |
| GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on native_gpu_memory_buffers: disabled_software oop_rasterization: disabled_off protected_video_decode: enabled rasterization: enabled skia_deferred_display_list: disabled_off skia_renderer: disabled_off surface_synchronization: enabled_on video_decode: enabled viz_display_compositor: disabled_off webgl: enabled webgl2: enabled |
| Load (avg) | undefined |
| Memory (System) | 23.84GB (11.67GB free) |
| Process Argv | |
| Screen Reader | no |
| VM | 0% |
| Item | Value |
|---|---|
| Remote | WSL: Ubuntu-18.04 |
| OS | Linux x64 4.19.43-microsoft-standard |
| CPUs | Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz (8 x 2111) |
| Memory (System) | 22.35GB (21.83GB free) |
| VM | 0% |
Reacted by Hawkeye Parker, Chris Meadows, Dan, João Vitor Borges, Jaan Altosaar , Wei LYU, Juan Manuel Bermudez, Charles, Sarah Cross, Jhow and 6 more
Activity
bobaoapae commentedon Oct 5, 2020
Hi, my vscode remote ssh hangs forever on git push without any error
MrPointer commentedon Jan 29, 2021
For anyone else stumbling upon it, please take a look at this discussion on the WSL repo.
TL;DR
WSL2 has some serious issues with VPNs that set the MTU below the default 1500, e.g. 1350/1392/1300, because it always defaults to 1500, disregarding the real value set on its interface from Windows' side, as if it were stubbed.
So if you're connected over VPN and have the same behavior, please refer to the linked issue, especially the latest comments.
simwak commentedon Feb 10, 2021
Having the same problems sometimes with Remote SSH.
git push/git pullfrom command line still works. Only workaround is the close VS and reopen it again. Sometimes even two times.altosaar commentedon Apr 13, 2021
Having the same issue
CharlesAttend commentedon Aug 15, 2021
Still have this issue,
I did that to solve the problem : https://stackoverflow.com/a/63451663/9596478
MartinEmrich commentedon Nov 11, 2021
Same issue, even when the key was already unlocked, and the Git server is not behind a VPN tunnel...
after killing all SSH processes and trying again, it works.
It would be nice if vscode would time out on non-progressing git-via-ssh operations after a reasonable time (maybe 30 or 60s?), and also not do all at once (having a multi root workspace with >20 repositories, and vscode using 1 cpu core for each, it just melts the CPU)
EHYPI commentedon Nov 11, 2021
Same issue with vscode and the WSL remote extension. The WSL2 bash terminal is unable to operate git successfully, I am not on a VPN, though one is installed. When the VPN is on, WSL2 simply can't connect to any internet (that's a different issue and I don't need to fix it). My .bashrc does initialize an Anaconda base environment, though I have the same problem whether or not I subsequently deactivate it.
Initially
git fetch,git pull, orgit pushresulted in a certificate failure:fatal: unable to access 'https://companygithubrepo': server certificate verification failed. "CAfile: none CRLfile: none"I fixed that by taking the steps here to save and configure a certificate:
https://stackoverflow.com/questions/67647067/git-clone-from-gitlab-fails-on-linux-while-working-in-windows-git-bash
Now I just get the hanging behavior noted above. A WSL2 instance from outside vscode works fine.
J-HowHuang commentedon Nov 12, 2021
Found out that VS Code had updates and told me to restart. Afterward it ask me to login to Github again, then the problem was solved.
MartinEmrich commentedon Nov 15, 2021
I don't use GitHub repositories, so the problem still persists.
One way to trigger it for shure is to start vscode before unlocking the SSH key in the agent. (Sometimes, it happens afterwards as well)
VSCode should either relay the passphrase prompt to the UI so the user can input it (
SSH_ASKPASS*,...), oder make the SSH child process fail for non-unlocked keys (e.g. by somehow preventing interaction with /dev/tty for the ssh process?)EHYPI commentedon Nov 15, 2021
Are you using the remote WSL extension and using git through the Linux terminal? I had no such luck.
EHYPI commentedon Nov 22, 2021
I finally found resolution through TWO actions.
I think for people coming here they just need to set up a credential storage or helper rather than messing with anything related to certificates. See this problem and solution: https://stackoverflow.com/questions/66503781/git-asks-for-password-to-push-on-wsl-2-ubuntu-but-not-on-windows-why-is-that
First step: I did eventually get an update notification which replaced one problem for another. Rather than hanging, it was now asking me for credentials every time. Then I followed the advice at the above link, except that my git-bash installation is in the AppData folder.