git clone unable to get local issuer certificate
时间: 2023-10-14 07:04:36 浏览: 135
The error message "unable to get local issuer certificate" usually occurs when Git is unable to verify the SSL certificate of the remote repository. This issue can be resolved by configuring Git to trust the SSL certificate or by disabling SSL verification. Here's how you can resolve this issue:
1. Configure Git to trust the SSL certificate:
- Download the SSL certificate for the remote repository. You can typically do this by opening the repository URL in a web browser and exporting the SSL certificate.
- Save the SSL certificate file to your local machine.
- Open a terminal or command prompt and navigate to the Git repository you want to clone.
- Run the following command, replacing `<path/to/certificate.crt>` with the path to the downloaded SSL certificate:
```
git config http.sslCAInfo <path/to/certificate.crt>
```
- Try cloning the repository again.
2. Disable SSL verification (not recommended):
- Open a terminal or command prompt and navigate to the Git repository you want to clone.
- Run the following command:
```
git config http.sslVerify false
```
- Try cloning the repository again.
Please note that disabling SSL verification is not recommended as it compromises the security of your connection. It's better to configure Git to trust the SSL certificate if possible.
阅读全文