tags:

views:

51

answers:

1

Hi All,

I am trying to host a git repository. Googling around found this tutorial regarding hosting git repositories. But things didn’t go well :(

I am using Ubuntu 10.04. IP: 192.168.0.131 Openssh running on port 22

It was going good till setting up gitosis-admin repo. Here is what I did.

I generated public key on this host linux machine and initialzed gitosis with that key.

ssh-keygen –t rsa.
sudo -H -u gituser gitosis-init < ~/.ssh/id_rsa.pub

Then I tried to clone gitosis-admin repository on linux machine with different forms

git clone [email protected]:gitosis-admin.git 

git clone ssh://[email protected]:22/gitosis-admin.git

But getting ERROR:

Permission denied (publickey)
fatal: The remote end hung up unexpectedly

Could you please help me on this?

A: 

The problem is not Gitosis itself, but that your SSH key gets rejected. This can be because it has not been authorized (is not in gituser’s authorized_keys file), because your SSH server is configured not to accept public keys, because your SSH key is weak or because you are not sending one at all.

Have a look at the logs of your SSH server to see whether (and why) your public key is rejected. On Ubuntu, the file should be located at /var/log/auth.log. Look for the word publickey and/or try cloning your repository to see what happens in the log file. You can use something like sudo tail -f /var/log/auth.log to watch new entries as they arrive.

Scytale
Thanks for your reply. Now I am getting error fatal: 'gitosis-admin.git' does not appear to be a git repositoryfatal: The remote end hung up unexpectedlyGoogle indicates that this is a very common problem. tried all the options i could find with no luck :( Could you please direct me to right path?Thanks a bunch.
Vaman Kulkarni
This message means that at least the SSH part is working now. However, I’m no Gitosis user, therefore I cannot help you with that error. It would probably be best to ask another question about this.
Scytale