git config

Mac

config file /User/{username}/.gitconfig

error

  1. Failed to connect to github.com port 443:connection timed out
  • Enter System Path /private/etc/hosts and add
    1
    2
    3
    4
    5
    140.82.114.3 github.com
    199.232.69.194 github.global.ssl.fastly.net
    185.199.108.153 assets-cdn.github.com
    185.199.109.153 assets-cdn.github.com
    185.199.110.153 assets-cdn.github.com
  • sudo killall -HUP mDNSResponder to update hosts
  1. HTTP/2 stream 1 was not closed cleanly before end of the underlying stream
  • use sudo git config --system http.version HTTP/1.1

本文作者: 孟 虎
本文链接: https://menghu1994.github.io/blog/2023/10/Git/index/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!