Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Setup git in wsl2 windows

How can I setup the git in wsl? I cannot get it setup

Tried installing and setting but getting error
fatal: unable to access 'https://github.com

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

  1. Download WSL and Ubuntu from Windows
  2. Type sudo apt update
  3. Type

sudo touch /etc/resolv.conf

sudo chmod 777 /etc/resolv.conf

sudo printf 'nameserver 8.8.8.8\nnameserver 4.4.4.4' > /etc/resolv.conf

  1. Install git by sudo apt install git
  2. git config --global --add safe.directory '*'
  3. git clone your repo repository
  4. Add your credentials by using a personal token as password is outdated
  5. git config --global credential.helper store (optional to store the credentials)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading