大夥好,我在Git裡面已經配置:
git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080
eg:
git config --global http.proxy http://aa:111@172.1.2.5:8080
但是當我克隆的時候,還是報錯:
git clone https://github.com/plusjade/jekyll-bootstrap.git aaa
請問我還需要設定什麼嗎?
新手,研究了會,這塊沒弄好,謝謝。
PHP中文网2017-04-24 09:16:08
我也是深受公司代理上網其害啊,好多請求都要走代理,shit。
建議你用全域 代理。省去了 一些設定代理的麻煩
window 下推薦 Proxifier linux下 Proxy Chains
大家讲道理2017-04-24 09:16:08
寫了一個smart_switcher,可以自動判別並設定各種代理,特別適合office有代理、家裡無代理各種切換的情況。
原理是根據《如何為 Git 設定代理? 》來的,不過簡化到超簡單,只要設定你的網關IP和Port即可。
ReadMe在此。 。 。
A auto-detect proxy switcher fot http, https, ftp, rsync, ssh, git protocols.
A smart proxy switcher wrapper, supports http, https, ftp, rsync, ftp, connc It can automatically detect your network environment and set proxy for you.
If you usually switch the network environment (maybe home with no-proxy and workplace with proxy), it may help you a lot.Tested in zsh and bash.
Screenshot
Install
source /path/to/smart_switcher.sh
and, make sure set your proxy_server/gateway in .smart_switcher.sh
supports cecho, who will bring some colors for you.smart_switcher
ssh and git. You can install it easily in path ./usr/bin/connect
巴扎黑2017-04-24 09:16:08
參考這兩篇文章
http://infong.net/config-proxy-for-git/
http://ricksu.blog.163.com/blog/static/18906433820125294929508/
阿神2017-04-24 09:16:08
設定全域代理
git config --global https.proxy https://user:password@address:port
好像你的那個有點問題,試試看這個。