Git over https to self-hosted gitlab-ce server fails

Hello. New to gitlab and vcs systems in general. I installed gitlab per the directions on the gitlab site. Configured to authenticate to Active Directory and configured to enable https per gitlab-ce documentation https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/nginx.md#enable-https. I’m using self-signed certificates.

git clone https://gitlab-test/username/user_sandbox.git
Initialized empty Git repository in /home/username/workspace/scratch/user_sandbox/.git/
error: while accessing https://gitlab-test/username/user_sandbox.git/info/refs

fatal: HTTP request failed

Can anyone help me figure out what I’m missing?

The first thing to check is what version of Git you have on your local machine (using git --version). Git versions older than 1.7.10 had an issue where they did not properly prompt for credentials.

If you have an older version and you can’t upgrade, you could try doing the clone with your username in the URL like this:

git clone https://username@gitlab-test/username/user_sandbox.git

This should make Git prompt for your password.


Alternatively, this could be because of your self-signed certificate.

Can you try to run your clone command this way and post the output? It will provide further details about the error:

GIT_CURL_VERBOSE=1 git clone https://gitlab-test/username/user_sandbox.git

Feel free to strip out usernames and domains/IPs, as long as you replace them with something that makes it clear what was there.

Hi Kohenkatz.
Thanks for your quick response. You are right on both fronts.
It looks like a combination of old git and certificate errors.
Using “GIT_CURL_VERBOSE=1 git clone https://user@gitlab-test.example.com/user/sandbox.git” results in a password prompt, followed by a certificate error (see output below)

fatal: HTTP request failed

Cheers