繁体   English   中英

在 wsl2 windows 中设置 git

[英]Setup git in wsl2 windows

如何在 wsl 中设置 git? 我无法设置它

尝试安装和设置但出现fatal: unable to access 'https://github.com

  1. 从 Windows 下载 WSL 和 Ubuntu
  2. sudo apt update
  3. 类型

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. 通过sudo apt install git
  2. git config --global --add safe.directory '*'
  3. git 克隆你的 repo 存储库
  4. 使用个人令牌添加您的凭据,因为密码已过时
  5. git config --global credential.helper store (可选存储凭据)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM