Search code examples
gitubuntuwindows-subsystem-for-linux

Unable to download/ use git in Ubuntu WSL


I've recently tried setting up WSL using Ubuntu however as I try to download things using terminal commands it just gets stuck. Depending on how lucky I am it will download portions and then just stop. In this image, I tried installing NVM following the instructions on GitHub with no success. Screenshot1

I then tried spamming it and got "lucky" when the download was completed but nothing happens then it just timed out. Here I also tried downloading ohmyzsh. Screenshot2

I've read around and it could be a network issue? Maybe a git issue or both? Git doesn't work for me (worked once or twice then stopped working). It too also gets stuck. (First one is clone using HTTPS second is SSH) Screenshot3

I tried reinstalling Ubuntu with no success. Don't really know what to do. Expected it to just work.


Solution

  • Thanks for the suggestions, it was indeed a network issue. After checking network settings I found that it said WSL had no internet connection and did some reading and found this which was the solution (however the network thing still says WSL no internet connection but everything works so idk)