MENU

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

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

国内大部分地方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不要紧