git SSL certificate problem: unable to get local issuer certificate
时间: 2023-10-19 19:31:23 浏览: 430
This error usually occurs when Git is unable to verify the authenticity of the SSL certificate provided by the remote repository. It could be due to a missing or incorrect SSL certificate configuration on your system.
To resolve this issue, you can try the following steps:
1. Update Git: Make sure you have the latest version of Git installed on your system. You can check the version by running `git --version` in the command line. If you have an older version, consider upgrading to the latest stable release.
2. Verify SSL Certificate Bundle: Git uses a bundle of trusted SSL certificates to verify the authenticity of remote servers. Check if your Git installation has a valid certificate bundle. By default, Git looks for certificates in one of the following locations:
- Mac/Linux: `/etc/ssl/certs/ca-certificates.crt`
- Windows (MSYS/Git Bash): `mingw64\ssl\certs\ca-bundle.crt`
If the certificate bundle is missing or outdated, you can obtain a new one from the curl website (https://curl.haxx.se/docs/caextract.html) and save it to the appropriate location.
3. Configure Git to use the certificate bundle: If the certificate bundle is not located in the default location, you can configure Git to use a specific certificate bundle file by running the following command:
```
git config --global http.sslCAInfo /path/to/certificate-bundle.crt
```
Replace `/path/to/certificate-bundle.crt` with the actual path to the certificate bundle file.
4. Disable SSL verification (not recommended): If you're in a development environment or trust the remote repository, you can temporarily disable SSL verification by running the following command:
```
git config --global http.sslVerify false
```
Note that this is not recommended for production environments or when working with untrusted repositories.
Try these steps and see if it resolves the SSL certificate problem in Git. If the issue persists, please provide more details about your operating system, Git version, and any specific error messages you're encountering for further assistance.
阅读全文
相关推荐
















