1 つまたは 2 つの方法
--golbal
: すべてのリポジトリのプロキシを設定します (グローバル プロキシを設定します)。
- 追加されていません
--golbal
: 指定されたウェアハウス ディレクトリのプロキシを設定します (ローカル プロキシを設定します)。
2. 実施方法
2.1. グローバルプロキシの設定
http://127.0.0.1:7890
静的ホスト: VPN のポートに注意してください。
http://
2 つのプロキシ モードがありますhttps://
(訪問した Web サイトに応じてhttp
、またはhttps
どちらの方法を選択するかを決定します)。
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy http://127.0.0.1:7890
git config --global --unset http.proxy
git config --global --unset https.proxy
2.2. 特定の Web サイトのみにプロキシを設定する: たとえばGithub
http.
との間にproxy
プロキシが必要な Web サイトの URL を挿入します。
git config --global http.https://github.com.proxy http://127.0.0.1:7890
git config --global http.https://github.com.proxy socks5://127.0.0.1:7891
git config --global --unset http.https://github.com.proxy
2.3. 指定したリポジトリで使用するプロキシを設定する
git clone https://github.com/skywind3000/asyncrun.vim.git --config https.proxy=https://127.0.0.1:7890
2.4. プロキシが成功したかどうかを確認する
git config --global --get http.proxy
git config --global --get https.proxy