Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
754 views
in Technique[技术] by (71.8m points)

git - Can I fork a forked repo to get access to it, where the original repo is private?

There is a repo under different organization to which I don't have access. Can any of my friends fork and give me the access? Can I fork the repo, which they forked already?

Is there anther way that I can access the repo? Read-only access would be fine.

To all, Thanks for the comments. I just want to understand If there is any other legal way to quickly access the repo. Wanted to understand the technical feasibility.

Thinking that adding me as a Collaborator takes time, I looked for some quick options. Its better I will ask the Owner.

Yes, I am not going to take the cloned repo from someones machine, who have access. Thanks for the answers.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Can any of my friends fork and give me the access. Can I fork the repo, which they forked already?

Not using GitHub's forking feature:

Private forks inherit the permissions structure of the upstream or parent repository. For example, if the upstream repository is private and gives read/write access to a team, then the same team will have read/write access to any forks of the private upstream repository. This helps owners of private repositories maintain control over their code.

I strongly advise you not to try to circumvent the access controls on the private repository you wish you access. At the very least it's unethical and you may be breaking laws and contracts. It would be much better to request access and honour the answer you receive.

From a purely technical perspective there's nothing stopping a person with a local clone from sharing it (though again this is very likely to break laws, contracts, or both). By doing so you're not just putting yourself at risk, you're putting your friend at risk too.

Just because something can be done doesn't mean it should be done.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...