GIT clone報錯: SSL certificate problem: unable to get local issuer certificate

清風艾艾發表於2018-04-04
    今天,我們專案的私有GIT倉庫已經建立好,可以由web頁面透過使用者名稱和密碼登入檢視資料倉庫。

    但是,在我的windows本地安裝完git客戶端,進行遠端clone的時候報錯,報錯資訊如下:
$ cd d:
admin@zh MINGW64 /d
$ pwd
/d
admin@zh MINGW64 /d
$ ls
'$RECYCLE.BIN'/      LIBRARY/                      vbback/
'Foxmail 7.2'/      'System Volume Information'/
 Git/                Thunder/
admin@zh MINGW64 /d
$ cd Git
admin@zh MINGW64 /d/Git
$ ls
bin/  etc/           LICENSE.txt        tmp/           unins000.msg
cmd/  git-bash.exe*  mingw64/           unins000.dat   usr/
dev/  git-cmd.exe*   ReleaseNotes.html  unins000.exe*
admin@zh MINGW64 /d/Git
$ mkdir repo_target
admin@zh MINGW64 /d/Git
$ cd repo_target/
admin@zh MINGW64 /d/Git/repo_target
$ ls
admin@zh MINGW64 /d/Git/repo_target
$ git init
Initialized empty Git repository in D:/Git/repo_target/.git/
admin@zh MINGW64 /d/Git/repo_target (master)
$ git clone
Cloning into 'shared'...
fatal: unable to access '.40.167/...-public/shared/': SSL certificate problem: unable to get local issuer certificate
admin@zh MINGW64 /d/Git/repo_target (master)
透過網上檢視,有人push的時候遇到同樣的錯誤,解釋是本地缺少認證,關閉本地的SSL驗證即可,操作如下:
$ git config --global http.sslVerify false
admin@zh MINGW64 /d/Git/repo_target (master)
然後再發起clone操作,會彈出一個git的登陸驗證的使用者名稱和密碼框,輸入正確的使用者名稱和密碼即可進行clone了:
$ git clone
Cloning into 'shared'...
warning: redirecting to .40.167/...-public/shared.git/
remote: Counting objects: 5793, done.
remote: Compressing objects: 100% (40/40), done.
Receiving objects:  31% (1852/5793), 106.23 MiB | 124.00 KiB/s



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29357786/viewspace-2152598/,如需轉載,請註明出處,否則將追究法律責任。

相關文章