第一次从git上拉取代码,出现的错误

2020-07-10  本文已影响0人  哈利波特会魔法

Mac环境下安装brew失败解决方案

使用命令 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 安装失败

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

可替换以下命令

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

关闭Git 代理

git config --global --unset https.proxy

git config --global --unset http.proxy
//////////////////////

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
开始一直报错Failed to connect to raw.githubusercontent.com port 443: Connection refused error: Error: 7,

尝试过改动git config的代理,没有用,

换中科大的源,也没有用

最后解决办法如下,重装command line tools,再执行安装指令,homebrew安装成功。

removing the old tools

 rm -rf /Library/Developer/CommandLineTools

install xcode command line tools again

xcode-select --install

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

输入:rvm -v , 报错:commend not found , 输入下面语句就好了

source ~/.rvm/scripts/rvm

昨天在一次 pod install 之后,虽然完成了第三方库的更新,但是 cocoapods 却有这样的一条提示:

image

本着有问题就去解决的原则,打开 Google,找到了这样一条解决方法,

终端运行:

sudo rm -rf ~/.cocoapods

pod install

想着应该解决了的我万万没想到,第二个错误又来了:

image

Are you kidding me ? 别人不是都成功了?

只好再次 Google,找到这样一条:

https://github.com/CocoaPods/CocoaPods/issues/4293

image

终端运行:

cd ~/.cocoapods/repos

git clone https://github.com/CocoaPods/Specs.git master

image

Tips:最好在网络良好的时候运行 。(中间因为断网到 20% 停止,再尝试结果失败,甚至重新安装 CocoaPods 就不详细说了)

1761594791727_.pic_hd.jpg

出现这个问题, 用下面这句话解决:


1771594792102_.pic.jpg

同时把http也加上: 就是执行2句话: 执行完上面那句继续执行这个: git config --global http.postBuffer 9524288000

以上部分是复制的别人的文章,,担心下次找不到原文链接,只能复制别人的记在自己的知识点中,感谢~

上一篇下一篇

猜你喜欢

热点阅读