CocoaPods通过网络代理执行资源更新

xiaoxiao2021-04-18  51

一、使用网络代理

首先在电脑设置网络代理配置。

二、设置git的http、https代理

1.查看git是否已经设置网络代理

首先可以先查本地的git配置有没有配置http/https代理:git config --global -e

如果没有看到 [http]proxy和 [https]proxy就代表没有设置http/https代理。

2.给git 添加代理配置 :  https://host:port

git config --global http.proxy https://host:port

git config --global https.proxy https://host:port

4.验证设置结果

添加完成之后可以再进去看一下 git config 此时http.proxy 和 https.proxy应该都是对应的值了

三、再执行pod install或者pod update就可以了。

四、取消git的http、https代理

git config --global --unset http.proxy

git config --global --unset https.proxy

转载请注明原文地址: https://www.6miu.com/read-4820150.html

最新回复(0)