Explore Courses Blog Tutorials Interview Questions
0 votes
in DevOps and Agile by (19.4k points)

Using Git, is there a way to tell it to accept a self-signed certificate?

I am using an https server to host a git server but for now, the certificate is self-signed.

When I try to create the repo there for the first time:

git push origin master -f

I get the error:

error: Cannot access URL     

https://the server/git.aspx/PocketReferences/, return code 22

fatal: git-http-push failed

1 Answer

0 votes
by (27.5k points)

You can set GIT_SSL_NO_VERIFY to true:

GIT_SSL_NO_VERIFY=true git clone

or alternatively configure Git not to verify the connection on the command line:

git -c http.sslVerify=false clone

Browse Categories