Can I give read-only access to a private repo (from a developer account)?

This is such a stupendously BASIC requirement for MANY MANY people, why do you still not allow read only access to private repositories for personal accounts?

I myself am having to consider just creating another Github account, and creating a brand new repository containing my latest code from my private (other account) repo.

I want to give access to potential employers to see my private code which I most definitely DON’T want to make publicly available!

Please do something to fix this, it is I consider a major flaw with your system.


1 Like

A non obvious way to do this using a read-only deploy key.

Here is an example workflow that accesses a private repo using a deploy key:

Deploy keys look useful, but as far as I understand, they are limited only to SSH access (they are SSH keys). They would be useless in environments limited to HTTP(S) access.

+1 on read-only access to private Github - would be great if could be time-limited or retractable.
As a tech mentor and hiring evaluator, developers are very hesitant to share their projects.
Git has long ago become the platform for sharing code - they need to expand its use cases.


+1 I can’t believe this post is 4 years old and not yet done, is their anything planned on the roadmap yet?


+1 – this would be extremely useful! Please do consider adding this feature.

+1 Having to protect all the branches on a project you just want to share is quite inconvenient

1 Like


I’m trying to do something that in Azure Devops is quite trivial: create a CI Workflow in a private repository, and from it checkout another private repository. I was hoping to do this: give the Github Actions build-agent read-access to the secondary repository, so that we can use the $GITHUB_TOKEN.

But there isn’t such an option. Instead I’ve seen the following options:

  • Add a ‘machine user’ to the organization and create an SSH key for it with readonly access to the secondary repository. This is not desirable as it generates extra costs due to the per-user pricing, for a service we already pay for.
  • Create a personal access token and give it readonly access to the secondary repository. This is not ideal as the token is now tied to a user, if he/she leaves then we need to remember this and change the tokens. To make matters worse this PAT has to be read/write.

I hope readonly PAT’s will be implemented eventually.
Otherwise really enjoying Github Actions, it’s alot more intuitive than Azure Devops.

1 Like

Seriously this is an extremely needed feature, and I 99% do open source.

Just want to add my voice to the chorus that this is not a satisfactory state of affairs. This should not be a feature limited to teams and enterprises, as freelance developers do exist. Lock it behind a pro paywall if you have to but give us the feature.

+1 ! Add me to the increasing list of people who want this feature.

I’m working on a free mod for a video game using github for my source control, but I had issues with people previously making forks of my code and re-releasing it as their own work. I am NOT okay with that. I had a lot of documentation included in my repo, so I had to redirect ALL of that. I had to make my repo private, which makes it harder to find legitimate contributors.

While my repo was public, I directly linked to certain data files in the repo for users looking for documentation. I want to be able to link READ ONLY copies of my work that cannot be forked, cloned, or downloaded as a zip. It blows my mind that this is not a basic feature and presently available. Please make this happen, thanks!

+1 Add me to the list as well for having read-only access

this just really seems like a must for many of us especially for testing with users who don’t know what they are doing it only seems logical to refuse a push request.

+1. It’s sort of essential from access management’s point of view.

Quite important since the private repos have states between fully private and fully access for collaborators.

+1 can’t believe it’s been this long and still not resolved.

+1 We need this. It’s also been asked so many times. It’s like the product people at GH don’t even care.

Insane that this isn’t a thing. Please implement this! It should be quite easy to have a read only collaborator that can just check up on the project without actually being able to change anything

+1 Please add this, I do not understand why a collaboration platform will not have this. This is quite insane.