今天想pod 一下SnapKit框架, 结果报错:
[!] Error installing SnapKit
[!] /usr/bin/git clone https://github.com/SnapKit/SnapKit.git /var/folders/fx/w3d8yx6d2118q68wjm34__dm0000gp/T/d20180415-1866-3qyi3a --template= --single-branch --depth 1 --branch 4.0.0
Cloning into '/var/folders/fx/w3d8yx6d2118q68wjm34__dm0000gp/T/d20180415-1866-3qyi3a'...
fatal: unable to access 'https://github.com/SnapKit/SnapKit.git/': Failed to connect to 127.0.0.1 port 1080: Connection refused
搜索了一些不靠谱的方法, 后来在简书上看到一个靠谱的方法, 特粘贴如下, mark一下, 以备不时之需!
解决办法:
-
open ~/.gitconfig
-
删除文件里面的:
[http "[https://github.com"](https://github.com%22);] proxy = socks5://127.0.0.1:1080
网友评论