Gitlens hangs when fetching remote repository via WSL

947 Views Asked by At

I'm using Gitlens with VS Code via Git installed in WSL2. (I'm using Amazon Linux 2 as my distro). Performing a fetch in either the Remotes or Repositories view in Gitlens causes it to hang. It puts up a "Fetching" notification but never completes. Doing a fetch in command line Git works no problem.

There's a reported issue: https://github.com/eamodio/vscode-gitlens/issues/1497 but no resolution. I'm wondering if anyone can suggest how to debug this or anything else I could try. Love the look of Gitlens but obviously it's unusable in this state.

Versions: Windows 10 Home 10.0.19042 Build 19042, Visual Studio Code 1.59.1 (July 2021), Gitlens v11.6.0 installed under WSL.

2

There are 2 best solutions below

1
On

This problem went away for me. I believe it was a git credentials problem. I used git config credential.helper store to store my git credentials.At the same time I also moved to running inside a WSL container but I don't think that was material to the problem.

0
On

I was able to solve the problem by switching to SSH key authentication. I had to clone the repository again via the SSH link and then it worked fine.