LoginSignup
1
0

More than 3 years have passed since last update.

新しいコマンドシェルを開いたときにgitのproxy設定を実行させる

Last updated at Posted at 2019-09-28

OS側の設定をそのまま反映させる.~/.bashrc末尾に以下を追加

.bashrc
if [ -z "$HTTP_PROXY" ]; then
    git config --global --unset http.proxy
    git config --global --unset https.proxy
    echo "git proxy解除完了"
else
    git config --global http.proxy $HTTP_PROXY
    git config --global https.proxy $HTTPS_PROXY
    echo "git proxy設定完了"
fi
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0