MENU

特殊地区无法使用 git 的问题

March 20, 2021 • Read: 4629 • 杂谈阅读设置

国内大部分地方 github 都可以直接上,但有些地区是无法直接访问的,需要使用梯子。成功访问 github 仅仅只是第一步,如果要使用 git clonegit push 等命令对于这些特殊地区又将是一番折磨

简单来说,如果使用 git 命令与 github 进行交互报错,例如

  • LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

解决方法如下(环境 macos):

  1. nano ~/.gitconfig
  2. 添加以下内容
  • [https "https://github.com"]
  • proxy = https://127.0.0.1:10086
  • [http "https://github.com"]
  • proxy = socks5://127.0.0.1:10086

其中端口号以服务器设置为主,见下图

Last Modified: April 25, 2021
Archives Tip
QR Code for this page
Tipping QR Code
Leave a Comment

2 Comments
  1. a a

    你服务商暴露了 #(高兴)

    1. mathor mathor

      @a 不要紧