Gitolite git clone requires ssh password

前端 未结 3 1102
花落未央
花落未央 2021-02-10 22:34

using Gitolite on a Ubuntu server. Have a project im working on that i need a particular syntax for the git command.

Works great:

git clone gitolite@serv         


        
3条回答
  •  失恋的感觉
    2021-02-10 23:22

    If the first version works, that means the public keys have been published under the account named 'gitolite': ~gitolite/.ssh/authorized_keys.

    The permission issue you have encountered is described here: "Creating SSH keys for Gerrit and Hudson": note that all the parent directories of a .ssh shouldn't have write permission for group or other: /home, /home/yourUser, /home/yourUser/.ssh.

    Plus, you shouldn't ever clone a gitolite repo with the full path of the repo: servername/home/gitolite/repositories/testing.git is wrong (and would by-pass gitolite completely).
    servername:testing.git is right.

    From the gitolite V2 doc:

    The following problem(s) indicate that your pubkey is bypassing gitolite and going straight to a shell

    running git clone git@server:repositories/reponame (note presence of repositories/ in URL) works.

    [A proper gitolite key will only let you git clone git@server:reponame (note absence of repositories/)]

提交回复
热议问题