2

I've installed Gotolite 3 on my CentOS 6.2 (64-bit) system using yum, and am trying to clone gitolite-admin with Tortoisegit on Windows 7 (64-bit), which I installed with PLink. Tortoisegit just says it's cloning but the progress bar never moves and no files ever show up in folder glssh.html, until finally it aborts with an error 128 (HTTP request failed, git did not exit cleanly).

The ~gitolite3/.ssh/suthorized_keys looks like this:

# gitolite start
command="/usr/share/gitolite3/gitolite-shell gitkey",no-port-forwarding,no-X11-     forwarding,no-agent-forwarding,no-pty ssh-rsa  AAAAB3NzaC1yc2EAAAABJQAAAIEAozy1qK68k2iu6rTJHNifMMne9DXvsm/pSeqMprRqJAdtLNHLxsFoPT7JF8Ct5GLbyZRWzV4tGjPnp7LJjsodMrjKes5km4LO1Q4tZPisdQu/awYkz8gg54sBwyJPlaIoL8pvMlzot+ZfcMwBm7Amgs5zEgqn4p+vVtqoOyh/sPk= Gitolite Admin
# gitolite end
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIBpO6jH4BPN8KwSZHEtG6kvkmWT/WZbtWSzpkklOjHrc1qu+pT0QHR1NfM8/pxOodbKoSmxUC1iaMVvhmURK4FFPJvvCIhUPud01BYCffjuBcYIYr1lfGwWVWc8Wvqg3DGkjL4bVEIYGx6gsg8OmLDMqzjXYuTW/yt6gKoEBs5oMw== Gitolite Account Key

I had a lot of trouble getting Tortoise (or Git bash) from prompting me for a password, but I don't think the keys are the problem anymore. I assume the gitolite-shell command is getting triggered, or Tortoise would just fail immediately like it does with the other (shell account) key. Is the problem now on the server side? The instructions for installing from the RPM were pretty sketchy (and neglected to mention anything like gitolite setup -pk to install a key to begin with.

2 Answers 2

1


You need to set in etc/ssh/sshd_config

PasswordAuthentication no

or

Match User yourUser
        PasswordAuthentication no

That should solve the asking for password Problem.


Now Selinux is going to complain https://bugzilla.redhat.com/show_bug.cgi?id=827389
To check this
On your gitolite-server

[root@centos63 ~]# setenforce 0 

On your gitolite admin account

ssh yourUser@yourBox info
#Should be the answer message
hello admin, this is yourUser@yourBox running gitolite3 3.04-1.el6 on git 1.7.1

 R W    gitolite-admin
 R W    testing

Set your Selinux back to enforcing mode

[root@centos63 ~]# setenforce 1 

and do a ssh yourUser@yourBox info if you dont get the same message as before you need to update your Selinux-Policies

Install this updates

  1. selinux-policy-3.7.19-159
  2. selinux-policy-targeted-3.7.19-159

I got them from http://people.redhat.com/dwalsh/SELinux/RHEL6/noarch/
The Problem should be gone.

0

The gitolite setup -pk step is clearly mentioned in the setup page.

First, make sure to use a ssh key without password protection first. No need to add difficulties (ssh-agent on the client side) on top of difficulties (validating the gitolite on the server side)
See "Can not add user with Gitolite" for illustration. Or "Creating a SSH key with ssh-keygen does not create the .ssh folder")

Second, make sure the user environment variable HOME is defined on Windows (it isn't by default)

Read "gitolite: can connect via ssh, can't clone" for more on the ssh setup, and make a file named '`%HOME%.ssh\config with the content:

host gitolite
     user gitolite3
     hostname yourCentOSServerName
     identityfile ~/.ssh/gitkey

And make sure 'ssh gitolite' displays the gitolite welcome message, as detailed in "Other Features", as message similar to:

hello gitkey, this is gitolite3@yourCentOSServerName running gitolite3 v3.03-34-ga171053 on git 1.7.10.3

 R W gitolite-admin
 R W testing

(you seemed to have picked 'gitolite3' as the user account name for running your gitolite server)

Make sure ~gitolite3 chmod is in 755 (no 'w' on group or others), or ssh won't work (permission denied)

If ssh still doesn't work, see "Unable to Git-push master to Github" for ssh troubleshooting:

ssh -vvv gitolite

Should tell you more about any ssh error you might have.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .