Can I give read-only access to a private repo (from a developer account)? #23128
-
Hi everyone, apologies if this is repeating a topic discussed already. Can I give read-only access to my private repo, to someone who is not a collaborator at present? Can I share a url, or add someone as a read-only collaborator? I don’t want to give fork/clone/download rights. I have a Developer account at present (not a Team/Business account, so cannot structure an organization-based acess). Here are the types of Github accounts. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 172 comments 50 replies
-
In a private repository, repository owners can only grant write access to collaborators. Collaborators can’t have read-only access to repositories owned by a user account. More information about permission levels for a repository owned by a user account can be found here: https://help.github.com/articles/permission-levels-for-a-user-account-repository/ Having said that, I know that we’ve heard users request these kinds of granular permissions before, and I’ll add your +1 to that existing feature request.
It’s worth noting here that cloning a repository is a central operation in the collaboration model that GitHub provides. For example, the read-only access that we currently offer to GitHub Organizations still allows users to both clone and fork the repositories that they have permission to read: https://help.github.com/articles/repository-permission-levels-for-an-organization/ With all of that in mind, I believe that it’s unlikely that we’ll change our permission model to disable the ability to clone a repository that someone has read access to; even if we do allow for read only access to private repositories owned by user accounts in the future. |
Beta Was this translation helpful? Give feedback.
-
Dear GH Team Any plans to implement private repo access restriction for collaborators to read-only + pull-request? I want collaborators on my private (user) repo(s) put don’t want to allow them direct push… Where is this feature on your roadmap? Thanks |
Beta Was this translation helpful? Give feedback.
-
Hi @sfindeisen, Thanks for this feedback! We’re always working to improve GitHub, and we consider every suggestion we receive. I’ve logged your feature request in our internal feature request list. Though I can’t guarantee anything or share a timeline for this, I can tell you that it’s been shared with the appropriate teams for consideration. Cheers! |
Beta Was this translation helpful? Give feedback.
-
Using protected branch ( especially for master) will give you some options, such as requesting members with write permission review to the changes before merging. You can also enforce the need for owner review. I did not tried protected branches with private reops before but I think it would be the same as the public repos. |
Beta Was this translation helpful? Give feedback.
-
@waleedmortajaThis is not exactly what you need.
|
Beta Was this translation helpful? Give feedback.
-
+1 from me. |
Beta Was this translation helpful? Give feedback.
-
+1 Would be extremely helpful in corporate environment. |
Beta Was this translation helpful? Give feedback.
-
+1 I’m trying to use Github as a place to keep my work and show potential employers. Would love to still have the ability to make it private and just give people access to view. |
Beta Was this translation helpful? Give feedback.
-
+1 - I have a couple of private repositories I want to share with friends but I don’t want them to be able to write to them. |
Beta Was this translation helpful? Give feedback.
-
+1 Extending this string, because of the work I do with public repos, it would be nice to be able to directly invite people to watch some public repos directly through github (as opposed to email or twitter), without giving them write access. Maybe this is already possible? |
Beta Was this translation helpful? Give feedback.
-
+1 on read only access |
Beta Was this translation helpful? Give feedback.
-
I just went to add a collaborator to a private project with read-only access and was surprised that I couldn’t do it. |
Beta Was this translation helpful? Give feedback.
-
+1 I want to show the code I have done from edX courses to potential employers, but I can’t make them public due to edX’s honor code, It would be usefull to have a way of granting by an URL, view only permission to a private repository, just like in google drive for example. |
Beta Was this translation helpful? Give feedback.
-
Having more granular control on private repos for individual users is a must. Sure if they can read it they should be able to clone/fork but i want to disable specific users ability to push with out a propper pull request. Same with branching. Really should be able to have same functionallity as public for private, just we control the viewers. Thank you, Joshua Dooley |
Beta Was this translation helpful? Give feedback.
-
Working with a colleague overseas that I want to be able to give access to pull my code (for reference/educational purposes), but not to be able to push. |
Beta Was this translation helpful? Give feedback.
-
This is taking years +1 |
Beta Was this translation helpful? Give feedback.
-
You guys won't implement it, right? From 2018 to 2024. Hopeless |
Beta Was this translation helpful? Give feedback.
-
this functionality would be helpful indeed! |
Beta Was this translation helpful? Give feedback.
-
Hopeless |
Beta Was this translation helpful? Give feedback.
-
i need this functionality! |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
+1, would love this to be implemented. |
Beta Was this translation helpful? Give feedback.
In a private repository, repository owners can only grant write access to collaborators. Collaborators can’t have read-only access to repositories owned by a user account. More information about permission levels for a repository owned by a user account can be found here:
https://help.github.com/articles/permission-levels-for-a-user-account-repository/
Having said that, I know that we’ve heard users request these kinds of granular permissions before, and I’ll add your +1 to that existing feature request.
It’s worth noting here that cloning a repository is a central operation in the collaboration model that Gi…