小弟公司對外都要透過 proxy 才能存取,而我又常需要抓取外部 svn 或 github 中的程式碼下來參考,因此研究了一下如何設定 proxy 讓 git 與 svn 使用。
環境:
編輯 ~/.subversion/servers 檔案,設定 globe 的 http-proxy-host 與 http-proxy-port
在 svn checkout 時改用 http 或 https 協定即可:
svn checkout http://flot.googlecode.com/svn/trunk/ flot-read-only
Git
設定好環境變數 http_proxy 與 https_proxy 即可。
在 git clone 時改用 http 或 https 協定即可:
git clone http://github.com/carlhuda/janus.git ~/.vim
參考
http://realchecko.blogspot.com/2007/05/git-over-http-proxy.html
環境:
- MacBook Pro with OSX Lion 10.7.1
- svn, version 1.6.16
- git version 1.7.4.4
編輯 ~/.subversion/servers 檔案,設定 globe 的 http-proxy-host 與 http-proxy-port
在 svn checkout 時改用 http 或 https 協定即可:
svn checkout http://flot.googlecode.com/svn/trunk/ flot-read-only
Git
設定好環境變數 http_proxy 與 https_proxy 即可。
在 git clone 時改用 http 或 https 協定即可:
git clone http://github.com/carlhuda/janus.git ~/.vim
參考
http://realchecko.blogspot.com/2007/05/git-over-http-proxy.html