cygwin git 設置代理

git config --global http.proxy http://proxyuser:[email protected]:8080

  • proxyuser 用戶名
  • proxypwd 密碼
  • proxy.server.com 代理服務器
  • 8080 端口
如果想消除代理的設置:

git config --global --unset http.proxy


如果想查看代理的設置

git config --global --get http.proxy

但是,我設置的時候添加用戶名和密碼的時候,出錯,於是我把用戶和密碼去掉
只有:
git config --global http.proxy http://proxy.server.com:8080


然後就可以直接使用github 上的倉庫;

設置socks的代理 http/https協議(clone https://前綴的repo會走ss)
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章