I\'m trying to get GitLab up and running on my server. I followed the installation instructions at the gitlab github page and everything went well.
The issue is, whe
This means that the gitlab ssh server was not properly configured.
Edit /etc/ssh/sshd_config
and assure that:
PasswordAuthentication no
ChallengeResponseAuthentication no
This should enforce ssh key only logins which is also a good security measures. Many newer distros do already have this enabled by default.
Don't ask me if you get locked outside, clearly SO is not the place where to ask how to configure and use a private/public key pair.
If the installation went well, that means your gitlab is able to clone the gitolite-admin repo without issue.
But you say it passes the status check, which means you are using, for ssh connection, an account named 'gitlab'.
That also means that any client will have to ssh with that same account 'gitlab
', not 'git
'.
So if your ssh key has been added through the gitlab interface, then you can git clone/git push to a remote name origin which would have the address 'gitlab@server
'
To debug some more, check out some other tips mentioned in "Setup Git Remote SSH (git-upload-pack / git-receive-pack)":
If you cannot push locally (on the server itself, that is on 'localhost'), try at least a:
ssh -vvvT gitlab@localhost
It shouldn't require any password, since /home/gitlab/.ssh/id_rsa
and /home/gitlab/.ssh/id_rsa.pub
both exist.
on the git server edit /etc/ssh/sshd_config
uncomment the following lines under the authentication section or add them:
PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys
give your server a power cycle and then fire up gitlab
I received the same password prompt. My issue was that I had restricted ssh usage to only a couple of users. I added the git user to the AllowUsers list sshd_config, and everything worked great.
This started happening to me quite a lot lately - for work projects git would ask me my email and password. When entered it continues ok but it's annoying.
I can fix this for any given application that I have access to with:
git config remote.origin.url git@github.com:user_org_or_co/repo_name_itself
e.g.
git config remote.origin.url git@github.com:smithw/bookmarkapp
Your git and gitlab users are passwordless?
How the sshd_config
is?
check if this line is in the file: PermitEMptyPassword Yes
Anyway I guess it unsafe, in my installation, I put this 'Yes', clone and then keep the old config... When Cloning the ssh_key is saved by user git, and it will not ask password anymore..
But by now, i run into another error, when Im going to push, for every new User, we have to reconfig ssh for permit empty push and then keep back the config.
(I still haven't tested this method, because I found out that my gitlab isn't creating the repos in git user :/ )