Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
1. Create a file: /etc/wsl.conf.
2. Put the following lines in the file in order to ensure the your DNS changes do not get blown away
generateResolvConf = false
3. In a cmd window, run wsl --shutdown
4. Restart WSL2
5. Create a file: /etc/resolv.conf. If it exists, replace existing one with this new file.
6. Put the following line in the file
nameserver # Or use your DNS server instead of which is a Google DNS server
7. Repeat step 3 and 4. You will see git working fine now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment