2015年6月24日水曜日

備忘録:gitをプロキシ環境下で使う方法

久しぶりなのに、お手軽更新で恐縮です

- なにがしたいの?
NATサーバがないPrivateVPCのEC2みたいな環境からgit cloneしたい。とかいうやつ

- 環境
Server1:squidなんかで立てているproxyサーバ(100.100.100.1:3128)
Server2:PrivateVPCにある箱入りサーバ(192.168.1.1)

- 手順
-- HTTPS通信のプロキシ登録
$ git config --global https.proxy http://100.100.100.1:3128

-- 行頭のgitをhttpsに読み替える的なやつ
$ git config --global url."https://".insteadOf git://

-- 満を持してclone
$ git clone git://github.com/hogehoge/fugafga.git

----

おしまい

0 件のコメント:

コメントを投稿