git clone 报错fatal: unable to access ‘https://github.com/xxx/xxx.git/‘: SSL certificate problem: ...

克隆 github 上的代码到本地时报错:

$ git clone https://github.com/HalfStackDeveloper/FloatBall.git -b master
Cloning into 'FloatBall'...
fatal: unable to access 'https://github.com/HalfStackDeveloper/FloatBall.git/': SSL certificate problem: unable to get local issuer certificate

遇到下面这个指令,再克隆,可解决

git config --global http.sslverify false

克隆成功

$ git clone https://github.com/HalfStackDeveloper/FloatBall.git -b master
Cloning into 'FloatBall'...
remote: Enumerating objects: 270, done.
remote: Total 270 (delta 0), reused 0 (delta 0), pack-reused 270
Receiving objects: 100% (270/270), 16.74 MiB | 3.52 MiB/s, done.
Resolving deltas: 100% (89/89), done.

猜你喜欢

转载自blog.csdn.net/xiaoyu_wu/article/details/131468521