Github - forking a private repository - github

I have access to a private repository. If I fork the private repository what is the access the owner of the original repository or the admin of the original repository have to my forked repository? How do these rules change if I fork a public repository?

When forking a private repository, all the collaborators will be copied automatically, meaning the owner will have push rights to your fork. You can later remove collaborators from the repository settings page.
When forking a public repository collaborators are not copied so you'll be the only one with push rights.

Related

What happens to the forks when deleting the original repository?

I want to know what happens if the original repository is deleted when there are different forks. Do the forks stay on GitHub, or are the forks also deleted?
It depends whether the original and the fork are public or private, according to GitHub's documentation:
Deleting a private repository will delete all of its forks.
Deleting a public repository will not delete its forks.
More detail on this page:
Deleting a private repository
When you delete a private repository, all of its private forks are
also deleted.
Deleting a public repository
When you delete a public repository, one of the existing public forks
is chosen to be the new parent repository. All other repositories are
forked off of this new parent and subsequent pull requests go to this
new parent.
If original private repo deleted: all of its forks will be deleted.
If original public repo deleted: its forks will not be deleted.
If public repo is converted to private, and deleted the original: forked repo will not be deleted.
a public repository's forks will remain public in their own separate repository network even after the parent repository is made private.
So, If you fork from a public repo, forked repo will not be deleted.
If you fork from private repo, forked repo will be deleted.
Source: https://help.github.com/en/articles/what-happens-to-forks-when-a-repository-is-deleted-or-changes-visibility
Just to add further information: on Bitbucket a forked repository will not be deleted, when the parent is deleted. Found here:
If the original repository is deleted, the fork remains.
This answer is based in the documentation. Once you fork a...
... public repo, you'll always have access to the respective files and folders (no matter if the repo is made private later on).
... private repo, all of its private forks are also deleted.

Github - Removing collaborators after they fork a private repo

My organization has a private repo and we've brought on a few contractors and given them access to the code base.
These contractors have been forking the code base, and I wanted to evaluate the potential security implications of that.
Could any of these forkers make the code public if they choose to?
If their access is removed from the original project, will their access to the forked repo also be removed?
Could any of these forkers make the code public if they choose to?
Yes, they can push it to a new public Git repo (on GitHub or any other Git hosting service)
If their access is removed from the original project, will their access to the forked repo also be removed?
See "Removing a collaborator from a personal repository"
While forks of private repositories are deleted when a collaborator is removed, the person will still retain any local clones of your repository.
For a better security, contractors usually operate on PCs inside the organization through VPN. Those PCs can then limit or prevent internet access.

Contributor commits public of a private Github repo

Is there a way to have each contributor to a private repo have their commits be public on their github account, while still having the Github repo private?
The idea is to demonstrate contributor contribution to private repos, without revealing folder structure / code of the repo itself.

How to give push and pull access to a Collaborator in public repo on GiHub

I am new to GitHub, can you please tell "How to give push and pull access to a Collaborator in public repo on GiHub"
I added a collaborator to my public repo and system automatically displays Push access to repository. I need collaborator to have Pull Access as well.
According to the Github Help, assuming that yours is a user account repository, a Collaborator can push and pull to that repository.
Therefore, your collaborator has already permission to pull.

Add collaborator to forked private repo

I have free GitHub account and forked a private repo.
Now I'd like to add collaborators to my fork.
But there's no "Collaborators" tab under Settings page.
Is this functionality not available for free plans?
This is probably due to the fact that you forked a private repo. So, only the owner of the original repo that you forked may share the project with other users - you cannot. For the same reason, you (probably?) can't make a fork of a private repo public - only the owner of the original private repo can make it public.