git命令下,mac环境下载依赖相关报错问题解决方案

1.安装fundry框架
curl -L https://foundry.paradigm.xyz | bash

2.写入环境变量
source /Users/xx/.bashrc

3.foundryup

问题1报错:致命错误:无法访问 'https://github.com/foundry-rs/forge-std

解决方案:
设置hosts文件:
添加指定url的ip地址:
140.82.112.4 github.com
185.199.110.133 raw.githubusercontent.com
199.232.69.194 github.global.ssl.fastly.net

问题2报错,如何发现命令另一个窗口报错:报错zsh: command not found
.bash_profile中修改的环境变量只对当前窗口有效,修改完.bash_profile之后记得在终端输入source ~/.bash_profile使之生效。
.zshrc在电脑每次自启时都会生效(永久有效),修改完之后在终端输入source ~/.zshrc使之生效。
需要在 .zshrc添加环境变量

问题3报错:
如果在vs code上,命令窗口找不到该命令,重启项目或者重新安装插件解决

问题4报错:
git config --list (查看git配置)

如果发现代理问题,需要删除代理的git配置
git config --global --unset http.https://github.com.proxy
git config --global --unset https.https://github.com.proxy

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章