git配置代理连接github

目前,不挂梯子git总是连接不到github,因而需要代理。

  1. 查看当前全局配置:
> git config --global -l

image-20230410162725353

  1. 取消当前的代理端口:
> git config --global --unset http.proxy
> git config --global --unset https.proxy
  1. 查看SSR的代理地址和端口,确定本机端口1080转发:

  1. 配置代理端口:
> git config --global http.proxy http://127.0.0.1:1080
> git config --global https.proxy https://127.0.0.1:1080
  1. 连接成功:

image-20230410173254842

posted @ 2023-04-10 17:35  Luison_Liu  阅读(357)  评论(0编辑  收藏  举报