Adding permissions to github repository only - github

I have an organization and want to add granular permissions for each repo. This does not seem possible and the docs send me to "Setting the base level permissions" which I do not want.
github docs

Answer is adding a person in the Settings of each repo. Should be in the docs.
Also, this is a stupid and dangerous way of adding people in an organization as I could easily add someone to this repo from outside the organization if I'm not careful. Very, very stupid. I should only be able to add people from WITHIN my organization, that's the entire f... point of having one in the first place.

Related

Adding repository collaborator as deployment reviewer

I am playing around with GitHub environments, specifically checking out on the actions approval feature.
I have created the related infrastructure in order to support this and I have also added a colleague as a collaborator to the project. I am trying to add them as a deployment reviewer as mentioned in this document, however the selection box in the related view does not list their name. As mentioned above, their access is set to collaborator and the doc states the following:
The reviewers must have at least read access to the repository.
So I do not think that this is a permission issue. Can anyone help with this?
Related documentation:
https://docs.github.com/en/actions/managing-workflow-runs/reviewing-deployments#about-required-reviews-in-workflows
https://docs.github.com/en/actions/reference/environments
Nevermind, I figured it out. It seems that the input on the page needs the full name of a team member in order to assign them as reviewers. Simply typing part of it does not work and gives the impression that it cannot find eligible reviewers.

how to allow 3rd party to create repo (repo transfer) in our Org without let them see our private repo?

We have hired a 3rd party to work on a project, we started by not creating any Repo on our Github, but they started with their Repo. So now it's time to transfer the repo. However, in order to transfer the repo, the developer is asking permission to create a Repo in our Org... but as far as I know, I can only invite him first as a collaborator, a member, before he can create any private repo in our Org... that means he can see our other repo...
I couldn't find any good answer online, please help. Thanks!
Have you tried using Github's Organization features? You can create an organization with your team members in it, and control who has access to what.
Here's a Github page that explains a bit more about how it works.
Do not add them as a member to your Org! (this is the only option today from Github, nor owners...of course). If you do so, this will give your external developer access to all of your repos.
The only way I found you can safely invite an external user is to create a Repo first, then add them in that Repo. By doing that, they will be invited only to that repo, and have no access to the others.
This is my workaround. If you have a better solution, please do comment. I am curious how the "transfer" feature works.

Primary maintainer gone. I was added to help maintain, but have no push access to the extension marketplace. What do I do?

I was recently added to a syntax theme repo to help maintain after the original maintainer has gone rogue.
The issue I'm having is that I'm unable to push to the extension marketplace. How would I go about getting access if I have no contact with the original maintainer?
Allow me to quickly answer what I'm sure will be the first question asked:
"How were you added as a maintainer without contact to the original maintainer?"
The theme is a repository within a github organization containing repos across many different editors. The organization owner granted me contributor access, however he does not have push access to the vscode marketplace either.

Teams that have read access to all repositories of an organization

in my Company, we've got a lot of repositories in one private github organization (not accessible publically). Ideally, all developers should have read access to all repos in that organization, while just having write access to the repositories of their project.
For that, I've set up a couple of github teams (for each project). Each of that teams should have write access for some repositories (easy to configure in the repo settings) but read access for all other repositories. I'm struggling with this one, as I can only grant read access to each individual repository. This is not only painful (because we have a lot of repositories) but will also not automatically work when new repos are created.
Is there anything, I'm missing to set this up properly?
Thanks, Matthias
You need to do it manually only as github doesn't provide this functionality.
All team members within the organization will have read-only access by default I believe (they can read and clone repositories).
If you want to give write access to certain teams, rather than go to repo settings, go configure in the team settings. Try this, maybe it will work:
create team, add members
add repositories in the respective tab, for which you want to provide write access to the team
under Settings, give write access (which will apply to the repositories added above against the team)

How do I make a readonly mirror of my github repo?

We need to have a read only github repo that mirrors our main branch.
I've noticed castle have managed to do it with their entire collection of repositories.
How would I go about achieving this?
Castleproject is an organization (also mentioned here) in order to restrict write access.
That is why you see read-only addresses on their projects.
That also means it (ie the organization "castleproject") can add users with read-only rights.
As a simple user owning a GitHub repo, you wouldn't have access to that feature.
You need to define an "organization".
I believe this is what you are looking for right here:
http://justcramer.com/2011/05/09/creating-a-one-way-git-server-mirror/