GIT clone报错: SSL certificate problem: unable to get local issuer certificate

   今天,我们项目的私有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 https://....40.167/...-public/shared/
Cloning into 'shared'...
fatal: unable to access 'https://... .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 https://....40.167/...-public/shared/
Cloning into 'shared'...
warning: redirecting to https://....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

猜你喜欢

转载自blog.csdn.net/www_xue_xi/article/details/79813765