fatal: unable to access 'https://github.com SSL certificate problem: unable to get local issuer certificate
时间: 2023-11-04 20:57:45 浏览: 94
这个错误是因为Git无法验证GitHub的SSL证书。解决这个问题的方法是通过以下步骤来配置Git:
1. 打开Git Bash或命令提示符。
2. 输入以下命令:`git config --global http.sslVerify false`
这将禁用Git对SSL证书的验证。
3. 重新尝试执行git clone或git push命令,应该不再报错。
请注意,禁用SSL证书验证可能存在安全风险,因此只有在确保连接到可信任的服务器时才应该使用此方法。
相关问题
fatal: unable to access 'https://github.com/ly525/luban-h5/': SSL certificate problem: unable to get local issuer certificate
fatal: unable to access 'https://github.com/ly525/luban-h5/': SSL certificate problem: unable to get local issuer certificate 错误是因为在进行git操作时,无法验证SSL证书的发行者。解决这个问题的办法是将git clone后面的地址进行一些改动,具体方法如下:
$ git clone https://github.com/ly525/luban-h5.git
Cloning into 'luban-h5'...
fatal: unable to access 'https://github.com/ly525/luban-h5.git/': SSL certificate problem: unable to get local issuer certificate
fatal: unable to access 'https://github.com/xuexuejishu/smellycat.git/': SSL certificate problem: unable to get local issuer certificate
这个错误是由于无法获取本地颁发机构证书导致的。解决这个问题的方法是通过设置git的配置来忽略SSL证书验证。你可以按照以下步骤进行操作:
1. 打开终端或命令提示符窗口。
2. 输入以下命令来设置git的配置:
```shell
git config --global http.sslVerify false
```
3. 然后再次尝试执行git clone命令:
```shell
git clone https://github.com/xuexuejishu/smellycat.git/
```
这样就可以忽略SSL证书验证,成功克隆GitHub仓库。