Check the ssh parts about githolite : the fact that you can connect to server.com through ssh means only:
- Your ssh key is registered in
server.com@ ~/.ssh/authorized_keys - this key is not associated with gitolite "there is no option"
command= ", which means" no matter what the incoming user requests, instead force this command ").
You are in an interactive session that can execute any command that you like.
What I don't like at all in the third-party tutorial is that it is trying to use the same name for the git user and the ssh non-root user
You must keep separate :
- non-root user ( which is not an account ), just the ssh key that will be associated with gitolite, with administrator privileges for
gitolite-admin REPO transactions) - hosting account , which should be "
git ", not gitolite , namely to avoid confusion between the two modes of use :git ( log in directly to server.com , no ssh here ): the interactive session needed to execute the git command (e.g. cloning the gitolite repository server and executing gitolite/src/gl-system-install )ssh git@server.com , which will use your public and private keys ~/.ssh/id_rsa(.pub) , which, as gitolites, will allow you to clone the gitolite-admin repository and push the repo back
Yet again:
"gitolite" is not a real account, but only the name allowed to execute commands on server.com as " git " (the actual "hosting account", as in the "git and repo hosting services").
All other git users will also execute git commands on server.com as git .
And this particular user ( gitolite ) will be associated with the gitolite authorization level through a forced command mechanism with privilege settings during gitolite installation to provide the user with the right to clone, modify and roll back the gitolite-admin repo .
(This is its only feature compared to all the other ssh git users you add: they will not have access to this particular git repo, which is gitolite-admin )
Trying to give a name with the same name, you just ask problems.
I don’t like to use the default naming convention for public / private keys, so I prefer to define these keys on the client with the name of the intended user:
~/.ssh/gitolite.pub ~/.ssh/gitolite
Then I define the configuration file: ~/.ssh/config with it:
host gitolite user git hostname server.com identityfile ~/.ssh/gitolite
(Pay attention to the user here: always git )
Then I can clone my gitolite-amin repo:
git clone gitolite:gitolite-admin
Vonc
source share