gitコマンド利用時にproxyを利用する設定

wgetでproxyの記事は以前書いたのだが、あくまであれはwgetのものでgitの場合は独自に設定が必要。

コマンドを打ち込むか設定ファイルを追加するかのどちらでも良い。
(コマンドを実行すると設定ファイルに記載される)

1
2
3
4
5
6
7
8
9
10
11
git config --global http.proxy http://yourproxyhost:port/
git config --global https.proxy http://yourproxyhost:port/
 
# 実行結果はファイルに記載される。
cat ~/.gitconfig
 
[http]
        proxy = http://yourproxyhost:port/
[https]
        proxy = http://yourproxyhost:port/
        
カテゴリー: コマンド タグ: , パーマリンク

コメントを残す

メールアドレスが公開されることはありません。

Time limit is exhausted. Please reload the CAPTCHA.