質問

is there a way to give a small group of people a way to get latest code, without being able to write, and have access to the usual set of git features like viewing git log etc.

Or is it enough to just give READ only permission to these users?

役に立ちましたか?

解決

Regarding GitHub, you can see the different ACL (Access Control Level) at "What are the different access permissions?"

If you are registering your private repo within an organization, then you would have the possibility to add users with Read Access Teams: that team would be able to clone/pull only, not push.
(They can fork, but the fork itself would be private, since it is a clone of a private repo).

Outside of GitHub (self-hosting repos), the usual way to add fine-grained access control levels is gitolite.


mainly I am looking to deploy my git repo on the production server by just doing git push

What you can do from a private repo is register a webhook, which will trigger a JSON payload. Your production server can listen to it, and pull only where there is a push in the GitHub repo (as in this gist).

他のヒント

you may want to take a look at gitolite. to configure gitolite they give you a git-repo called gitolite-admin.

if you then add to conf/gitolite.conf

repo project
    RW = you
    R  = friend1 friend2

you are able to read and write while your friends are only allowed to read from the repo. Auth via ssh public keys.

your friends the can use

git clone ssh://git@yourhost.com/project.git
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top