使用git的時候會出現的狀況。不過狀況還是可以區分出兩種情境:
- 該網站雖然使用https協定,但是憑證不合法(可能過期或是只有使用IP沒過DNS)
- 該網頁使用https協定,且使用瀏覽器開啟都合法,使用git卻不合法
情境2是因為ssl申請完畢後,需要有一個放到store的程序。git安裝時其實會去掃store,所以把原本的git移除以後重新安裝大概可以處理掉(網頁很多就直接教學說升級git,反正都要移除重裝了,不如就順便升級)。另外一種做法就是設定git的認證方式。windows上有schannel可以用(ubuntu目前還沒找到辦法,就只能自己手動輸入到store或是直接不認證)
git config --global http.sslBackend schannel
情境1的狀況,因為是本身的ssl認證狀態就是問題,所以最好就是從git的認證直接關掉:
git config --global http.sslVerify false
ref:
https://komodor.com/learn/how-to-fix-ssl-certificate-problem-unable-to-get-local-issuer-certificate-git-error/
https://forum.gitea.com/t/fatal-unable-to-access-ssl-certificate-problem-unable-to-get-local-issuer-certificate/1434
https://github.com/go-gitea/gitea/issues/8063
https://wiki.gentoo.org/wiki/Certificates
https://blog.csdn.net/sinat_24899403/article/details/114967572
沒有留言:
張貼留言