yarn install 时提示无法连接 github
在使用 yarn install 安装依赖包时,提示如下错误:
1 | Command: git |
在上面的错误中,我们可以找到错误关键词
git:、unable to connect to github.com,根据此信息,我们便可定位错误。
引发上述错误是因为 git 弃用了 git: 协议,所以只需要将
git 中的 git: 协议改成 https:
即可,命令如下:
1 | git config --global url."https://".insteadOf git:// |