Skip to content
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 pull hangs forever #985

Open
easeev opened this issue Jul 17, 2019 · 11 comments
Open

Git pull hangs forever #985

easeev opened this issue Jul 17, 2019 · 11 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug git
Milestone

Comments

@easeev
Copy link

easeev commented Jul 17, 2019

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: git@github.com: 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%
@joaomoreno joaomoreno added bug Issue identified by VS Code Team member as probable bug git labels Jul 18, 2019
@joaomoreno joaomoreno added this to the Backlog milestone Jul 18, 2019
@bobaoapae
Copy link

bobaoapae commented Oct 5, 2020

Hi, my vscode remote ssh hangs forever on git push without any error

@MrPointer
Copy link

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
Copy link

simwak commented Feb 10, 2021

Having the same problems sometimes with Remote SSH. git push/ git pull from command line still works. Only workaround is the close VS and reopen it again. Sometimes even two times.

@jaanli
Copy link

jaanli commented Apr 13, 2021

Having the same issue

@CharlesAttend
Copy link

CharlesAttend commented Aug 15, 2021

Still have this issue,
I did that to solve the problem : https://stackoverflow.com/a/63451663/9596478

@MartinEmrich
Copy link

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
Copy link

EHYPI commented 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, or git push resulted 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
Copy link

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
Copy link

MartinEmrich commented 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
Copy link

EHYPI commented Nov 15, 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.

Are you using the remote WSL extension and using git through the Linux terminal? I had no such luck.

@EHYPI
Copy link

EHYPI commented 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug git
Projects
None yet
Development

No branches or pull requests

10 participants