github: server certificate verification failed

后端 未结 7 949
予麋鹿
予麋鹿 2020-12-04 14:26

I just created a github account and a repository therein, but when trying to create a local working copy using the recommende url via

git clone https://githu         


        
7条回答
  •  囚心锁ツ
    2020-12-04 14:53

    I also was having this error when trying to clone a repository from Github on a Windows Subsystem from Linux console:

    fatal: unable to access 'http://github.com/docker/getting-started.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

    The solution from @VonC on this thread didn't work for me.

    The solution from this Fabian Lee's article solved it for me:

    openssl s_client -showcerts -servername github.com -connect github.com:443 /dev/null | sed -n -e '/BEGIN\ CERTIFICATE/,/END\ CERTIFICATE/ p'  > github-com.pem
    cat github-com.pem | sudo tee -a /etc/ssl/certs/ca-certificates.crt
    

提交回复
热议问题