Skip to content

Git pull hangs forever #985

Open
Open

Description

@easeev

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%

Activity

  1. added
    bug
    on Jul 18, 2019
  2. bobaoapae commented on Oct 5, 2020

    @bobaoapae

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

  3. MrPointer commented on Jan 29, 2021

    @MrPointer

    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.

  4. simwak commented on Feb 10, 2021

    @simwak

    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.

  5. altosaar commented on Apr 13, 2021

    @altosaar

    Having the same issue

  6. CharlesAttend commented on Aug 15, 2021

    @CharlesAttend
  7. MartinEmrich commented on Nov 11, 2021

    @MartinEmrich

    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)

  8. EHYPI commented on Nov 11, 2021

    @EHYPI

    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.

  9. J-HowHuang commented on Nov 12, 2021

    @J-HowHuang

    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.

  10. MartinEmrich commented on Nov 15, 2021

    @MartinEmrich

    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?)

  11. EHYPI commented on Nov 15, 2021

    @EHYPI

    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.

  12. EHYPI commented on Nov 22, 2021

    @EHYPI

    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

Metadata

Metadata

Labels

buggit

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions