I'm confronted with some problems when trying to configure gitosis on my Archlinux
http://wiki.archlinux.org/index.php/Setting_Up_Git_ACL_Using_gitosis
I referred to this wiki article and successfully installed gitosis.
$ sudo pacman -U gitosis-git-20090525-1-i686.pkg.tar.gz
$ sudo -H -u gitosis gitosis-init < /tmp/id_rsa.pub
And modified /srv/gitosis/.ssh/authorized_keys to include my local user's id_rsa.pub.
But when I run git clone
as the local user,
$ git clone gitosis@host:gitosis-admin.git
It says
Initialized empty Git repository in /home/wyx/gitosis-admin/.git/
gitosis@10.132.140.73's password: *****
fatal: 'gitosis-admin.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
So the git clone operation failed. I'm wondering why it tries to initialize an empty git repository in my local user's directory (/home/wyx)? And since I've already added local user's id_rsa.pub in .ssh/authorized_keys, why does it still ask for password?
Same problem, and in my case was that I had wrong authorized_keys in .ssh/. I must have messed it up at some point ...
I had the same problem on ubuntu,
It worked with
git clone ssh://git@serverName/absolutePath/gitosis-admin.git
This is what solved the problem for me (on Ubuntu):
Gitosis creates it's own
authorized_keys
file. If you already have that file, delete it and allow gitosis-init to recreate it. Once that's done, don't mess with the file.I finally got it working like this
where 1337 the port ssh is using.
I also faced the same problem "fatal: '/gitosis-admin.git' does not appear to be a valid repository." I searched a lot for the problem and finally found the solution.
Actually, the default address of gitosis user is "/srv/gitosis" : As in case of my setup having ubuntu server 10.04.
And when we write "git clone gitosis@server.com:gitosis-admin.git", it searches for gitosis-admin.git repository in /srv/gitosis. So when I entered inside the /srv/gitosis, I found out that there is another repository inside it named as repositories which consists of the gitosis-admin.git repository.
So actually by default the gitosis-admin.git was not in the default location. So I have to modify the command path and then it worked fine.
I got the repository cloned onto my local machine. I used the command as:
"git clone gitosis@server.com:repositories/gitosis-admin.git" and it worked fine for me.
See for the gitosis-admin directory in your case and I hope you will be able to solve your problem.