Rakesh Kumar Routray
Rakesh Kumar Routray

Reputation: 21

Clone of Gitlab repository through azure pipeline showing SSL error

I have been doing a git clone of a repository in Gitlab through an azure pipeline and it showed the following error:

2020-08-13T11:23:42.2930076Z ##[warning]Git fetch failed with exit code 128, back off 6.913 seconds before retry.
2020-08-13T11:23:49.1339276Z ##[command]git fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin
2020-08-13T11:23:49.3214993Z fatal: unable to access 'https://*****/gitlab/****/web.git/': SSL certificate problem: unable to get local issuer certificate

How could I resolve this issue?

Upvotes: 1

Views: 983

Answers (1)

Kevin Lu-MSFT
Kevin Lu-MSFT

Reputation: 35444

SSL certificate problem: unable to get local issuer

From the error log, this problem often occurs when using self-hosted agent.

This error occurs when a self-signed certificate cannot be verified.

You could running the following script on your local machine to turn off sslVerify .

git config --global http.sslVerify false

On the other hand , you could configure the git certificate.

  1. Add Enterprise CA certificate to git config –global http.sslCAInfo.

  2. Tell Git where to find the CA bundle by running:

    git config --system http.sslCAPath / absolute / path / to / git / certificates

or copying the CA bundle to the /bin directory and adding the following to the gitconfig file:

sslCAinfo = /bin/curl-ca-bundle.crt
  1. Restart the agent.

Try following the tutorial which mentioned in blog.

Here is a ticket about Unable to resolve “unable to get local issuer certificate” using git on Windows with self-signed certificate

Upvotes: 1

Related Questions