Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
699 views
in Technique[技术] by (71.8m points)

git - Github restricting access

I am using github.

I'm trying to figure out how to restrict repo access for a contractor i have.

I have the main rails codebase and i also have a contractor that will be doing some css/ux type work for me.

I want to give the contractor the ability to check in code to git hub only to certain folders.

Ideally, i can have him checkin code and then it can be deployed out to the server so that he can see the changes.

I don't think i can do this via limiting access within a specific git repo, but maybe there is a way to use two repo's and restrict access that way.

Any help would be appreciated!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

If all of the css/ux files are within a particular subfolder, and you want him to have access to everything in that directory, and further down, you could do it with git submodules.

The contractor would have push/pull rights to the repo that is a submodule, but no commit rights on the main repo.

You could also just use the pull request feature and make sure that he only commits to the folder he wants.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...