[git] git問題處理

dysonnnn發表於2024-10-19

問題集合

  1. The TLS connection was non-properly terminated
    執行git clone 指令的時候報錯
dysonnnn@dysonnnn-KPRC-WX0:~$ git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh
Cloning into '/home/dysonnnn/.oh-my-zsh'...
fatal: unable to access 'https://github.com/ohmyzsh/ohmyzsh.git/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.

解決方法:
參考 stackoverflow The TLS connection was non-properly terminated

  1. For anyone facing this issue after 2020, Use ipv4 by using "--ipv4" or "-4" flag in your git command.
ex: git clone <git url> -4

I am not sure why this happens but sometimes IPV6 connections are not able to establish a TLS connection but IPV4 connections have no issues.

  1. The solution
git config --global http.sslVerify false

from this blog solved my problem in the end.

相關文章