git write and read access without beeing user of s

2019-07-15 23:34发布

问题:

i was searching for a while, but couldn't find a fitting solution: My Case:

I have a server on which i have a git repository. The connection to the server is only possible with fitting ssh key. Is there a possibility to give a user, who hasn't access to the server, permissions to write and read from this specific repository?

Is there only the possibility by creating a user account for the user on the server or can i do it different? OF course i only want him to read/write to the repo, but i dont want him to see what is going on beyond this repository on the server?

Hopefully this is not to much thought outside the box?! Thanks in advance!

回答1:

If you had on the server the authorization layer Gitolite, you will be able to register that external user ssh public key, giving him/her access to one one specific repository (as configure in your gitolite configuration file)

(from the blog post "SSH and the Gitolite Installation – part 2")