Info
#

2025/06/23 (Mon) 07:36:56 GMT+0000 (UTC)
Type: PC | System: Unknown | Browser: Unknown ... More

Menu
.
+
#
  • @ /note/git/post-SetupProxyEnvironment
Content
.
+
#

Post: Nekoformi
Date: 2024/04/15

Setup Proxy Environment

大学や職場からリモートのGitリポジトリーを操作する場合はプロキシーを設定する必要があるかもしれません。

Bash
+
#
1:
2:
3:
4:
5:
// 全体に設定する場合 $ git config --global http.proxy http://プロキシーのアドレス:ポート番号 // 特定のリポジトリーに設定する場合 $ git config --local http.proxy http://プロキシーのアドレス:ポート番号

プロキシーの設定を元に戻す(削除する)場合は以下のコマンドを実行します。

Bash
+
#
1:
2:
3:
4:
5:
// 全体に設定する場合 $ git config --global --unset http.proxy // 特定のリポジトリーに設定する場合 $ git config --local --unset http.proxy

設定を確認する場合は以下のコマンドを実行します。結果に含まれるhttp.proxyが指定したアドレス、もしくは空であれば成功です。

Bash
+
#
1:
2:
3:
4:
5:
// 全体の設定を確認する場合 $ git config --global -l // 特定のリポジトリーの設定を確認する場合 $ git config --local -l