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)
- Couldn’t find host gitlab-test.example.com in the .netrc file; using defaults
- About to connect() to gitlab-test.example.com port 443 (#0)
- Trying 192.168.1.2… * Connected to gitlab-test.example.com (192.168.1.2) port 443 (#0)
- Initializing NSS with certpath: sql:/etc/pki/nssdb
- CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
- Certificate is signed by an untrusted issuer: ‘CN=gitlab-test.example.com,OU=1234,O=Company,L=Town,ST=State,C=US’
- NSS error -8172
- Expire cleared
- Closing connection #0
- Couldn’t find host gitlab-test.example.com in the .netrc file; using defaults
- About to connect() to gitlab-test.example.com port 443 (#0)
- Trying 192.168.1.2… * Connected to gitlab-test.example.com (192.168.1.2) port 443 (#0)
- CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
- Certificate is signed by an untrusted issuer: ‘CN=gitlab-test.example.com,OU=1234,O=Company,L=Town,ST=State,C=US’
- NSS error -8172
- Closing connection #0
error: while accessing https://user@gitlab-test.example.com/user/sandbox.git/info/refs
fatal: HTTP request failed
Cheers