中国境内升级因git问题失败

如果有人即使在添加了 http 代理设置后仍遇到问题,

GnuTLS recv error (-110): The TLS connection was non-properly terminated.

除了原始解决方案外,请将以下 postBuffer 属性添加到模板中,以解决我的问题。需要安装 gnutls-bin

hooks:
  before_code:
    - exec:
       cmd:
         - apt-get update -y
         - apt-get install -y gnutls-bin
         - git config --global http.proxy socks5://172.17.0.1:1080
         - git config --global https.proxy socks5://172.17.0.1:1080
         - git config --global https.sslVerify false
         - git config --global http.postBuffer 1048576000

# optional
  after_code:
    - exec:
       cmd:
         - git config --global --unset http.proxy
         - git config --global --unset https.proxy
         - git config --global --unset https.sslVerify
         - git config --global --unset http.postBuffer
2 个赞