When the repository is in GitLab with self-signed certificate, when the certificate is expired, git clone
shows the following message.
1 |
fatal: unable to access 'https://example.com/sample/repository.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none |
In such case, adding new valid ssl certificate solves the problem, but the following method enable us to clone repository easily.
1 |
export GIT_SSL_NO_VERIFY=1 |
There are another way.
1 |
git config --global http.sslVerify false |
After cloning the repository, when you get error because of ssl certificate expiration, you can disable ssl verification for the specific one repository.
git config http.sslVerify false