lazy8s
lazy8s

Reputation: 1

Self signed certificate SSL Error using self hosted GitLab

I have a hosted Git repo on my company intranet. I can clone, pull, push, etc successfully with command line Git by disabling sslverify. I know this is not ideal but I have no control over our certificate or IT infrastructure so it is what it is.

I paid for GitLab EE, setup the omnibus package and I'm trying to clone the repo via https. However I get an error that it cannot verify the SSL certificate. This is not entirely unexpected but I cannot figure out how to bypass the ssl verification with GitLab EE. In the http settings I set self verified to true and pointed it to my .pem in /etc/gitlab/ssl but I get the same error.

Can I just set sslverify to false like I did command line git?

Upvotes: 0

Views: 4062

Answers (2)

GGO
GGO

Reputation: 2748

You can define it in omnibus configuration package like Fairy says. Or you can use int a git bash command :

git config --global sslVerify false

This will disable the HTTPS verification of current repository

Upvotes: 0

Fairy
Fairy

Reputation: 3790

Since GitLab fails to pull from a Repo because the certificate check failed, you can set git specific settings in your /etc/gitlab/gitlab.rb. There is a key called omnibus_gitconfig['system'] there your config should be something like:

omnibus_gitconfig['system'] = { "http" => ["sslVerify = false"]}

This is bad practice and you should use it with caution.

You could specify the domain to disable certificate checks for with:

omnibus_gitconfig['system'] = { "http \"https://example.com\"" => ["sslVerify = false"]}

Upvotes: 2

Related Questions