Gitlab prompts for git password when cloning a git repository
Solution 1
Completely forgot to provide the solution. I actually had fixed the problem. It was a problem with the SSH keys.
I followed the guide on gitlabs on how to generate SSH keys. I didn't follow it properly. I missed the email address in 'ssh-keygen -t rsa -C "****@***.com"'
It works now.
Solution 2
I hit the same issue. For me the problem was that /etc/ssh/sshd_config had an AllowGroups directive that did not include the git group created by gitlab (viewing /var/log/secure spelled it out).
I appended git to the set of groups listed after AllowGroups, ran sudo /sbin/service sshd restart
, and then git clone git@...
worked as expected. Similarly, after the fix I can run ssh [email protected]
and it responds with "Welcome to GitLab..." which is an easy way to confirm the ssh keys setup is fine w/o accessing a specific repo.
Solution 3
Are you trying to clone with a HTTP URL? If so, git will ask for username and password. Try cloning with SSH URL; this will make git use the SSH keys that have been set up.
mokko211
Updated on June 20, 2022Comments
-
mokko211 almost 2 years
I have installed GitLab 7.9.1 using Omnibus.
Everything works. When I do a gitlab-rake gitlab:check, I get no errors.
However, when I want to clone a repository in /var/www, the console prompts me for a git password.
I have added the SSH key in the Gitlab interface. However, it still asks me for a git password when I try to clone a repository.
What do you think?
p.s I will like to point out that I have used the Omnibus installation and not installation from source.