GitHub 被墙了,烦!虽然可以通过代理继续上,不过那种感觉就好像吃了苍蝇,恶心。
简单说一下如何透过 GoAgent 访问 GitHub仓库。
首先如果你的代码仓库使用的 git:// 协议,需要转成 https:// 协议。
git remote rm origin git remote add origin https://github.com/sample/sample.git
为 git 命令设置 HTTP PROXY:
git config --global http.proxy 127.0.0.1:8087
然后是证书问题,可以直接关闭 SSL 证书校验:
git config --global http.sslVerify false
或者指定证书位置,如:
git config --global http.sslCAinfo /opt/goagent/CA.crt
git-config 相关的设置,可以通过一些环境变量覆盖,比如 GIT_SSL_NO_VERIFY / GIT_SSL_CAINFO 等,放到 shell 启动文件如 .bashrc, .zshrc 中即可,具体可参考 man git-config。
最后问候一下方婊子全家,你丫的一定不得好死!
@suches
http://btbtd.com/mods/blog/item.php?uid=1&item=4985
http://btbtd.com/mods/blog/item.php?uid=1&item=4985
发表于 @ 2013-09-06 05:56:46