Can a github repository be part of multiple organizations? - github

On GitHub, a user can belong to multiple organizations. Is it possible for a repository to be part of multiple organizations as well?

According to this blog post by GitHub, a repository can only belong to one organization.
Creating an organization helps you centralize your organization’s code. All repositories live under the organization, and billing goes through a central organization account.
You can fork one organization's repository into another organization's space, but the original belongs to just a single organization.

Related

Listing GitHub repos created by a specific user

Is there a way to list all repositories within an organization, created or contributed to by a specific user?
For concreteness, I am a member of the organization and I am the user in question.
The organization page has a ton of repos listed and I just want to see the ones that I made.

Can I group several GitHub repos together for permission management?

I have 10+ teams and 50+ repos in an organization account. The goal is to group selected repos into a management unit so I can grant access to teams with fine permission.
The members of the teams will keep changing roughly monthly.
Question
Is this possible?
If not, what's the best practice?
An organization is itself a group of repositories.
You can manage team access to an organization repository or to all repositories, not to a group of repositories inside that organization.
You would need to define one organization per group of repositories in order to grant access for said groups.

How to merge several Github users?

I am newbie github users and mistakenly created two github user accounts. I'm wondering how can we merge two github users account into one, including their corresponding repositories? any idea?
A quick something search will give you this:
Transfer any repositories from the account you want to delete to the account you want to keep. Issues, pull requests, and wikis are transferred as well. Verify the repositories exist on the account you want to keep.
Update the remote URLs in any local clones of the repositories that were moved.
Delete the account you no longer want to use.

Github organization permissions

I have a main repo that students are forking to do their homework. From the student's view of the repo, the list of collaborating teams is small (their individual team and my teacher team). However, from my view (as admin), there is a long list of teams with access. As a result, students are able to see within other students' private repos.
What is the correct way to manage this so that teams can fork a main repo, and limit access to that repo among teams.

How to know who is the maintainer of a GitHub repository?

Is there a way to know which people have merge privileges on a public GitHub repository. If the owner is a user and not an organization, then at least I know one maintainer, but it's possible that there are other users with merge rights. Also, if the owner is an organization it is possible, that not all members of the organization have merge rights. So is there a way to find the exact maintainers?
Team privileges are not public in general. Even an organization-membership is not public since the publicity must be chosen by the given member, as the Documentation states:
,,By default, your organization membership visibility is set to private. You can choose to publicize individual organization memberships on your profile."
This partly applies for their implementation of CODEOWNERS, too. If it is up to date the given source file is annotated with a link to its responsible GitHub user.
However there's normally no need to know the individual maintainers of a repository (since every interaction with repos you're able to access is covered by the GitHub UI, which also assures that somebody takes care about your request). If your attention is about a public repository you might search the commits for accepted pull-request. But in that case you would preferably fork the repo and just generate pull-requests on your own.
You are even not able to contact an organization via GitHub - try to find their official website, contact them and ask for their maintainers if you need that information.
GitHub (since July 2017) now officially supports "code owners" for projects. Code owners are individuals or teams that are responsible for code in a repository.
Project maintainers can add a CODEOWNERS file to their repository to make it easier for others to identify code owners and have code owners be notified to review Issues and Pull Requests.
See the announcement post and help article for more info.
Just go to the team members tab within your repo, on the right it will describe what type of member they are. Ex: member or owner.