Ssh – gitolite mac don’t add new user to authorized_keys

gitolitemacssh

I installed gitolite and every thing works fine for me as admin. But when I'd like to add add a new user the new user can't connect to the server. After I looked into the file authorized_keys I saw that the new user wasn't added to the file. During the commit of the new public-key I get some workings:

WARNING: split conf not set, gl-conf present for 'gitolite-admin'
Counting objects: 6, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 882 bytes, done.
Total 4 (delta 1), reused 0 (delta 0)
remote: WARNING: split conf not set, gl-conf present for 'gitolite-admin'        
remote: WARNING: ?? @staff christianwaldmann markwelch        
remote: sh: find: command not found        
remote: sh: find: command not found        
remote: sh: sort: command not found        
remote: sh: find: command not found        
remote: /usr/local/bin/triggers/post-compile/update-gitweb-access-list: line 26: cut: command not found        
remote: /usr/local/bin/triggers/post-compile/update-gitweb-access-list: line 23: grep: command not found        
remote: /usr/local/bin/triggers/post-compile/update-gitweb-access-list: line 26: sort: command not found        
remote: /usr/local/bin/triggers/post-compile/update-gitweb-access-list: line 26: sed: command not found        
remote: sh: find: command not found        
remote: sh: find: command not found

How can I fix it that gitolite auto-add the new user to the authorized_keys.

Best Answer

The section "uncommon errors" give some possible causes.

(Case 1) you copied a bare repo ("repo.git") from another g3 site (or g2 with GL_BIG_CONFIG on).
Then you pushed a change to "gitolite.conf" or ran certain server-side commands without adding the repo to the conf.

Conversely, you removed "repo" from "gitolite.conf" but did not remove the actual "repo.git" on disk.

(Case 2) This can also happen if you changed something like this

repo foo
    ...<some rules>...

to this:

@grp = foo
repo @grp
    ...<some rules>...

Also, even running gitolite setup will not fix this.

But it all comes done to:

The root cause is an internal consistency check that I do not wish to disable or subvert.
It is there for a reason, and I would prefer a warning that a human can investigate.

If you're sure the reasons are one of the two above, you can either add the repo to the conf file in case 1, or manually remove the gl-conf file from the repo.git directory in case 2.

Either way, run gitolite setup afterwards to make sure things are in good shape.


In this case, the solution was a complete "reset", as the OP crashbus mentions in the comments:

I solved the problem by deleting the "git" user completely from the system and following the tutorial form Git "Server" on OS X Lion.