1

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?

5
  • This problem usually occurs on self-hosted agents. If you use this kind of agnet, you can refer to the following answer to solve the problem. If not, you share your agent type gitlab verification method. Commented Aug 14, 2020 at 2:34
  • I am using agent pull "Azure Pipelines". Commented Aug 19, 2020 at 3:15
  • 1
    Till now i am unable to clone from gitlab ....my main challenge how to handle "git config --global http.sslVerify false" this command in azure devops pipeline Commented Aug 19, 2020 at 3:19
  • In Azure Pipeline, you could add a Command line task to run this script. Could you please help me check if this issue exists in the Checkout step? If yes, this method may not be suitable. By the way , I tested with Azure Pipelines ->vs2017-win2016 and it could work. Commented Aug 19, 2020 at 3:26
  • @RakeshKumarRoutray did you fix the issue? Commented Dec 6, 2021 at 11:13

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

2 Comments

but how to add this ssl false command in azure devops pipeline ? Could you please help me ?
@RakeshKumarRoutray if you have a fixed machine, run this command once in your machine and it will stay. If the VM is a clean one each time, you can add a task "Command Line" before the git clone to disable the SSL

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.