Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gitlab prompts for git password when cloning a git repository

Tags:

git

ssh

gitlab

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.

like image 905
mokko211 Avatar asked Apr 03 '15 13:04

mokko211


2 Answers

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.

like image 116
jefeveizen Avatar answered Oct 08 '22 08:10

jefeveizen


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.

like image 3
mokko211 Avatar answered Oct 08 '22 08:10

mokko211