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
CodePudding user response:
- Download WSL and Ubuntu from Windows
- Type
sudo apt update
- 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
- Install git by
sudo apt install git
git config --global --add safe.directory '*'
- git clone your repo repository
- Add your credentials by using a personal token as password is outdated
git config --global credential.helper store
(optional to store the credentials)