標籤:linux
晚上使用更新源之後使用了git 命令,但是報錯
error: server certificate verification failed
在stackoverflow 上有一頁專門解答:server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none ,針對不同情況,裡面有很多的解決方案。
我的屬於系統時間錯誤,和下面這個問題相同:
Another cause of this problem might be that your clock might be off. Certificates are time sensitive.
This was my problem. My university was blocking ntp packets, which was preventing my system from updating time. Once I configured the university ntp servers things were working again. Thanks for this tip! – Kyle Mar 9 at 16:51
問題重現
****@****:~$ date -RSat, 18 Jan 2014 06:11:27 +0800****@****:~$ git clone https://github.com/bugmeout/CPluslab.gitCloning into ‘CPluslab‘...error: server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none while accessing https://github.com/bugmeout/CPluslab.git/info/refsfatal: HTTP request failed
由於不能夠和時間伺服器通訊,用命令修改了時間之後,一切ok。
sudo date -s ‘22:36:00 2015-06-19‘
error: server certificate verification failed 解決方案