1

I have been installed gitlabhq on SERVER.

I have issue while cloning repo from client machine. Not work:

client> git clone git@my.serv.ip.addr:myrepo.git /tmp/myrepo

client> ssh git@my.serv.ip.addr
PTY allocation request failed on channel 0

Under server root I can do successfully command.

gitserv> sudo -u gitlab -H git clone git@my.ip.add.r:myrepo.git /tmp/myrepo
Start clonnin repo

I supposed that it is SSH keys issue, but don't know what to do.

By the way one strange think:

I can't login to ssh server from client machine

ssh root@my.serv.ip.addr
Received disconnect from my.serv.ip.add: 2: Too many authentication failures for root

But succesfully login from another server.

anotherserv> root@my.serv.ip.addr
gitserv>
Khaled
  • 36,533
  • 8
  • 72
  • 99
Stepchik
  • 99
  • 4
  • 11
  • 1
    There was problem in MaxAuthTries /etc/ssh/sshd_config. But i can't understand why ssh client recheck all private keys – Stepchik Feb 06 '13 at 08:39

1 Answers1

1

Since GitLabHQ is based on Gitolite, you must make sure that the following work:

ssh git@my.serv.ip.addr

As long as you don't see a Gitolite answer, any clone won't work.
You need to add a public ssh key to your GitLab profile, and check if ~git/.ssh/authorized_key is updated:

 command="/home/git/bin/gitolite-shell user_email_uuid",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa AAAAB3NzaC1...Bc5CtLFcg+lTz+ZKKWpf+p5/9ZaR9T/KtpbibnvhQ== username

When you see a similar line in ~git/.ssh/authorized_key, then the ssh request from the client should work.

VonC
  • 2,683
  • 5
  • 30
  • 49
  • I see that in ~git/.ssh/authorized_key ` # gitolite start command="/home/git/gitolite/src/gitolite-shell gitlab",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa # gitolite end ` But can't login ssh git@my.serv.ip.addr – Stepchik Feb 06 '13 at 11:33
  • I can access only throw server root not client machine > ssh git@my.serv.ip.addr and get ' hello gitlab, this is git@web3 running gitolite3 v3.2-gitlab-patched-0-g2d29cf7 on git 1.7.2.5 R W gitolite-admin ' – Stepchik Feb 06 '13 at 11:39
  • client>gitolite-admin.git has been cloned succesfully. But i has a lot of another project. It seem i get migration error. – Stepchik Feb 06 '13 at 11:44
  • @Stepchik you need to see your public key in that `~git/.ssh/authorized_key` file. GitLab should ask Gitolite to update that file once you have entered a public key in your profile *and* have added your account to a project. – VonC Feb 06 '13 at 12:57
  • I can clone gitolite-admin.git and nothing more. Gitolite config WARNING: split conf not set, gl-conf present for 'project1' – Stepchik Feb 06 '13 at 13:12
  • /home/git/.ssh/authorized_key looks normaly – Stepchik Feb 06 '13 at 13:16
  • @Stepchik you can clone the admin repo as `root@my.serv.ip.addr` or as `git@my.serv.ip.addr`? The error message reminds me of http://serverfault.com/a/422449/783, but also http://comments.gmane.org/gmane.comp.version-control.gitolite/1075. What is the version of your gitolite, btw? – VonC Feb 06 '13 at 14:16
  • Yes i can clone admin repo git@my.serv.ip.addr. I have been changed my gitolite version from 2.to 320 – Stepchik Feb 08 '13 at 05:31
  • @Stepchik so does `ssh git@my.serv.ip.addr` works now? Do you see a Gitolite greeting message? – VonC Feb 08 '13 at 06:36