与特定用户以只读方式在GitHub上共享私有git存储库 [英] Share a private git repository on GitHub with a specific user as read-only
问题描述
我终于想学习如何使用git,因此我正在GitHub上撰写有关版本控制的相当广泛的论文.感谢我的大学,我有一个免费 GitHub专业版帐户,因此我可以添加私有存储库.
我需要添加我的主管,以便他可以访问文档,但是我希望他的GitHub帐户具有只读权限.
如何允许特定用户以只读方式访问GitHub上的私有存储库?
考虑到
(该图显示了访问权限,但要点是:您可以选择读取")
,或者您可以保护和限制对分支的写访问权限(但您需要对 all 个分支执行此操作)
I'm finally trying to learn how to git, so I'm writing a rather extensive thesis with version control on GitHub. I have a free GitHub pro account, thanks to my University, so I can add private repositories.
I need to add my supervisor, so he has access to the documents, but I want his his GitHub account to have read-only rights.
How do I allow read-only access to a private repository on GitHub with a specific user?
Considering that a collaborator on a simple GitHub repo has push access, you have a few options:
transferring your repo to an organization (that you have created): you can then restrict push: Then you can add an external collaborator with only read access:
(the image shows wirte access, but the point is: you can select "Read")or you can protect and restrict write access to branch (but you need to do that for all branches)
这篇关于与特定用户以只读方式在GitHub上共享私有git存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!