문제

I have created a bare repository on a network shared drive (K:/). I am able to push and pull from different computers having access to the shared drive. My question is, how can I restrict certain users from pushing to the bare repository directly, and send a pull request instead?

도움이 되었습니까?

해결책

git doesn't come with any access control mechanisms.

So you will have to use something else for that. On linux, you can use users and groups to restrict access for some users. You may be able to do that on windows too.

Another way (used on GitHub) is, to use multiple clones of the same repo. Some users connect via http (read only without webdav) and some use ssh (full access).

You can also try gitolite or equivalent systems so you don't have to create a bunch of users on your system.

Also, don't expect to be able to control the access to a repository finer than read or write access. Either a user can read the complete repo, or he can not ready anything. The same is valid for write access.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top