Re: [gitolite] fatal: 'gitolite-admin.git' does not appear to be a git repository

2,308 views
Skip to first unread message

Ralf Hemmecke

unread,
Jun 7, 2012, 6:51:38 PM6/7/12
to gito...@googlegroups.com
> The directions mentioned nothing about setting up a "git" user so I set one
> up as a admin (since everyone is going to be going through this user to
> authenticate with my server). I then ran gitolite setup for the "git" user
> (again assuming everyone goes through the git user that has authorized_keys
> with various "commands=" in it). I copied MY .pub key into the "git" user
> authorized_keys file in the .ssh directory (actually appended, properly)
> and I'm getting this error when I attempt to clone to my machine from where
> I setup gitolite.

Can you try to remove your ssh key that let's you get shell access on
the server and try git clone again?

Most probably you've run into this problem.
http://sitaramc.github.com/gitolite/sts.html#ybpfail

If you really want shell access to the server and gitolite access then
you need two keys *and* you have to make sure that git does not take the
key that gives you shell access. You would do this by setting up
~/.ssh/config. Sitaram used to have a site for g2 where he described it.

I'm still running g2, but it's probably the same with g3.

I've something like this in my ~/.ssh/config
=====================
Host gitolite
IdentityFile ~/.ssh/gitolite
HostName gitserver.example.com
User git

Host gitshell
IdentityFile ~/.ssh/id_rsa
HostName gitserver.example.com
User git
=====================

Then "ssh gitshell" brings me into a shell onto the gitserver (it uses
id_rsa), while "git clone gitolite:somerepo" would clone a repository
(by using the key ~/.ssh/gitolite.pub that was meant for gitolite access).

Hope that helps.

Ralf

Andreas Stenius

unread,
Jun 8, 2012, 3:37:47 AM6/8/12
to Ralf Hemmecke, gito...@googlegroups.com
Well, I use the same key for both gitolite access and shell access, but for *different* user accounts. And that has worked flawlessly...

I never touch the .ssh/authorized_keys file for the gitolite account directly though, I think that is asking for trouble.

//Andreas

2012/6/8 Ralf Hemmecke <hemm...@gmail.com>

Justin Bleach

unread,
Jun 8, 2012, 9:18:52 AM6/8/12
to gito...@googlegroups.com, Ralf Hemmecke
So you probably have at alias file setup in your .ssh directory right? 

I guess I just need to find an example of where someone sets up a "git" user and then accesses gitolite through THAT user using THEIR other users(shell users) ssh key.
Message has been deleted

Justin Bleach

unread,
Jun 12, 2012, 9:19:40 AM6/12/12
to gito...@googlegroups.com
OK. So I've been thinking about what you guys said for a bit and I would please like just a little more clarification and I believe I am able to phrase my question a little better now.

I think I want on MY machine what was mentioned before in ~/.ssh/config. There are two "users" on my GIT server. justin (me) and git. So in my config I need the justin.pub setup as described and git.pub in the same way correct?

And then I just need to make sure user "git" does not have shell access?

Also since other people will be going through user "git" where should it's private and public keys exist? Private on server and everyone get it's public key?

Justin Bleach

unread,
Jun 21, 2012, 9:34:37 AM6/21/12
to gito...@googlegroups.com, Ralf Hemmecke
When I ran setup for my user on my git server I noticed a repositories directory and some other files created and then in my authorized_keys file the 'command' the documentation mentions.

My user(admin) has shell access so instead I'm trying to run the 'gitolite setup -pk git.pub' on my git server for a 'git' user I created but I'm confused why the 'git' user even has a key if everyone else's public keys are going to be in it's(git user) authorized_keys file so that everyone can do 'git clone g...@sev.er'.


On Friday, June 8, 2012 3:37:47 AM UTC-4, Andreas Stenius wrote:
Reply all
Reply to author
Forward
0 new messages