fatal: 无法访问 'https://git.cp.com/vuln/parser_fusion.git/':SSL certificate problem: unable to get local issuer certificate
时间: 2024-05-25 15:05:37 浏览: 21
这个错误表示 Git 无法验证 HTTPS 证书。这可能是因为 Git 无法找到证书颁发机构的根证书,或者根证书不在受信任的证书颁发机构列表中。
可以尝试以下解决方法:
1. 确认你使用的是最新版本的 Git。
2. 在 Git 命令前加上 `GIT_SSL_NO_VERIFY=true` 参数,禁用 SSL 验证。例如:`git clone GIT_SSL_NO_VERIFY=true https://git.cp.com/vuln/parser_fusion.git/`。
3. 手动下载证书,将其添加到 Git 的证书存储中。可以通过以下命令下载证书:
```
openssl s_client -showcerts -connect git.cp.com:443 </dev/null 2>/dev/null|openssl x509 -outform PEM >mycertfile.pem
```
然后将证书添加到 Git 的证书存储中:
```
git config --global http.sslCAInfo /path/to/mycertfile.pem
```
4. 如果你使用的是公司内部的 Git 服务器,可以联系管理员将其证书添加到受信任的证书颁发机构列表中。
相关问题
fatal: unable to access 'https://github.com/yyyist/yyy.git/': SSL certificate problem: unable to get local issuer certificate
这个错误通常是由于 Git 无法验证 SSL 证书导致的。您可以尝试以下解决方法:
1. 确认您的网络连接正常,尝试使用其他网络连接。
2. 确认您的 Git 版本是否过时,如果是,请升级到最新版本。
3. 禁用 SSL 验证,可以使用以下命令:
```
git config --global http.sslVerify false
```
但是这种方法不太安全,因为它会禁用所有 SSL 验证。
4. 手动添加 SSL 证书,可以使用以下命令:
```
git config --global http.sslCAInfo /path/to/certificate.crt
```
其中 `/path/to/certificate.crt` 是您的 SSL 证书路径。
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仓库。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://img-home.csdnimg.cn/images/20210720083646.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)