Git 修改 proxy,解决代理导致的代码无法 push 或 pull 的问题
生活随笔
收集整理的這篇文章主要介紹了
Git 修改 proxy,解决代理导致的代码无法 push 或 pull 的问题
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
事由:
更新 git@osc 代碼時,執行 git pull 響應一段時間后輸出 socket5 read timeout
解決方案:修改 git 的代理設置,這里是去掉了代理部分
關于 git 設置代理的方法:
// 查看當前代理設置 git config --global http.proxy git config --global https.proxy// 設置當前代理為 http://127.0.0.1:1080 或 socket5://127.0.0.1:1080 git config --global http.proxy 'http://127.0.0.1:1080' git config --global https.proxy 'http://127.0.0.1:1080'git config --global http.proxy 'socks5://127.0.0.1:1080' git config --global https.proxy 'socks5://127.0.0.1:1080'// 刪除 proxy git config --global --unset http.proxy git config --global --unset https.proxy總結
以上是生活随笔為你收集整理的Git 修改 proxy,解决代理导致的代码无法 push 或 pull 的问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: The file or director
- 下一篇: 2、格式化输出