News for hackers. Stuff that matters.
Re:Tell HN: GitHub will delete your private repo if you lose... by evouga on Tuesday January 31, 2023 @05:59PM (#34603583)
This doesn’t make any sense to me.

My private forks are *mine* and I most certainly do not want GitHub guessing at whether and when to permanently delete them without my consent.

Companies of course have the right to manage access to their proprietary source code, for example by only giving access to corporate accounts under their control and reclaiming those accounts when an employee leaves.

Re:Tell HN: GitHub will delete your private repo if you lose... by naikrovek on Tuesday January 31, 2023 @06:29PM (#34603897)
> My private forks are mine

Not if you create them using the "Fork" button in the UI.

Since this behavior has yet again surprised many people, here is the documentation: https://docs.github.com/en/pull-requests/collaborating-with-...

Re:Tell HN: GitHub will delete your private repo if you lose... by jefftk on Tuesday January 31, 2023 @07:50PM (#34604714)
Which also shows the right way to delete a private repo if you want people to be able to keep their forks:

If a private repository is made public, each of its private forks is turned into a standalone private repository and becomes the upstream of its own new repository network. Private forks are never automatically made public because they could contain sensitive commits that shouldn't be exposed publicly.

If a private repository is made public and then deleted, its private forks will continue to exist as standalone private repositories in separate networks.

But I agree this is confusing.

Re:Tell HN: GitHub will delete your private repo if you lose... by kadoban on Wednesday February 01, 2023 @12:03AM (#34606601)
The right way is to make it public first? That's insanity. Making a repo public just to delete it would be a huge information leak even if it was short in duration.
Re:Tell HN: GitHub will delete your private repo if you lose... by Ennea on Wednesday February 01, 2023 @07:49AM (#34609725)
Just force push something very empty to it before making it public. One more step, yay..
Re:Tell HN: GitHub will delete your private repo if you lose... by account42 on Wednesday February 01, 2023 @10:26AM (#34611776)
So they did think about this use case (deleting a private repo without deleting forks) but did not bother implementing a proper choice for the repo delete flow?
Re:Tell HN: GitHub will delete your private repo if you lose... by hoherd on Tuesday January 31, 2023 @09:29PM (#34605575)
This seems really bizarre to me. They seem to want people to have the network of connected GH repositories, but this behavior promotes "forking" a project in a way that breaks that network, which is to `git clone` and then create a new repo from that clone.

To put it another way, if the user had "forked" the GH repo onto GitLab, there would be no data loss, but that behavior would promote using GH in a way that breaks the upstream/downstream relationship that you see on GH.

It's even worse that the deleted fork was private. What impact does GH expect deleting the hosted private repository has on folks who really want to keep a private copy of the repo, such as offline or on another git hosting site? I'm really struggling to see any real-world positive sides to this mechanism. Seems like an ineffectual legal or compliance CYA.

Re:Tell HN: GitHub will delete your private repo if you lose... by mike_d on Tuesday January 31, 2023 @07:21PM (#34604410)
> My private forks are mine

Your employment agreement disagrees. Blame the confusion on the blurry line GitHub draws between forking work repos into personal accounts.

Re:Tell HN: GitHub will delete your private repo if you lose... by pxc on Tuesday January 31, 2023 @07:25PM (#34604447)
Did you forget the part where this code is MIT-licensed? Yes, they don't own it, but the code is still 'theirs' to keep forever as they see fit.
Re:Tell HN: GitHub will delete your private repo if you lose... by shagie on Tuesday January 31, 2023 @07:38PM (#34604578)
The original code may be licensed MIT. The MIT license allows for the project to be relicensed, closed source and it is also possible for a proprietary contributions that aren't MIT license to be added to it that are protected as any other closed source code. The MIT license is not "viral" and doesn't require that everything following from it is.

The person may be able to find the original code that was MIT licensed but that doesn't mean that the work done in house is also MIT licensed and that they have any right to it.

Re:Tell HN: GitHub will delete your private repo if you lose... by pxc on Tuesday January 31, 2023 @08:26PM (#34605054)
OP wrote

> That was an MIT-licensed open source project I worked on years ago.

which to me implies that OP also received the code under the MIT license and not some other license.

Re:Tell HN: GitHub will delete your private repo if you lose... by shagie on Tuesday January 31, 2023 @08:38PM (#34605151)
However, the work done while at the employer may not have been done under the MIT license unless permission to license it and distribute it under the MIT license was given by legal.
Re:Tell HN: GitHub will delete your private repo if you lose... by eyelidlessness on Tuesday January 31, 2023 @08:50PM (#34605247)
IANAL but…

> The original code may be licensed MIT. The MIT license allows for the project to be relicensed, closed source

… this is less compelling to me than this:

> and it is also possible for a proprietary contributions that aren't MIT license to be added to it that are protected as any other closed source code. The MIT license is not "viral" and doesn't require that everything following from it is.

AFAIK, changing the licensing terms of an MIT project isn’t retroactive to prior licenses. A quick search seems to confirm that.

The possibility of more restrictive or revocable licensing of subcomponents is more compelling as a rebuttal to “mine” at a philosophical level, but it’s not compelling from the perspective of GitHub revoking access. They’re welcome to comply with relevant legal actions, but they’re not actually the police of your licensee status and don’t even attempt to be.

Ultimately it’s the person who maintains the private repo who is responsible for and to any license challenges. GitHub isn’t a party or privy to those agreements, and again doesn’t have any pretense of such except compelled by legal action. And I give them the benefit of the doubt that this isn’t their motive.

This behavior is part of their own permissions model, and their own model of the relationship between “forks” and “private”, as defined by their own use cases. It’s a surprising one, but it needn’t have anything at all to do with their view of any given user’s repo’s license compliance.

Re:Tell HN: GitHub will delete your private repo if you lose... by shagie on Tuesday January 31, 2023 @10:35PM (#34606007)
The first part sets up the second part that unlike the GPL, the MIT license doesn't require that future contributions to the project be any particular license.

Presumably the OP can find the open source project MIT licensed without the company's contributions to it.

The only thing that the MIT license requires is:

> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

It doesn't even require attribution in the compiled application or any other notices.

And so, it is possible (and I would dare say likely) that the contributions that the OP made while working on the repo at the company unless specific permission was given otherwise would be considered as work for hire or as part of the work product as condition for employment and completely owned by the company (and not MIT licensed).

If the OP thinks that they should have access to the code because of the MIT license, that is something to take up with a lawyer. My IANAL senses suggest that that would be rather fruitless.

I don't find GitHub's model particularly surprising but rather the most reasonable one that opens GitHub up to the least liability for accidental disclosures of content. Error on the side of least privilege and if there's something to work out beyond that, that's something for the contributors to work out themselves - GitHub isn't the arbitrator for that.

Re:Tell HN: GitHub will delete your private repo if you lose... by eyelidlessness on Tuesday January 31, 2023 @11:43PM (#34606470)
> And so, it is possible (and I would dare say likely) that the contributions that the OP made while working on the repo at the company unless specific permission was given otherwise would be considered as work for hire or as part of the work product as condition for employment and completely owned by the company (and not MIT licensed).

This is a radical interpretation of the text if I’ve ever seen one. To the extent any of their contributions were merged upstream, they’re inherently MIT licensed by virtue of being in the same codebase which offers that license. To the extent they have unmerged changes, they may well be works for hire but it isn’t GitHub’s role to decide that between a second and third party.

Again nor do they want to. GitHub is extremely hands off about forks and the licensing implications thereof.

This isn’t a GH posture towards licensing disputes, it’s their posture towards their own authorization model. And that’s fine, but we shouldn’t conflate the two when they’re quite distinct.

Re:Tell HN: GitHub will delete your private repo if you lose... by shagie on Wednesday February 01, 2023 @12:11AM (#34606673)
Who's upstream?

Open source project and publicly accessible upstream? Yep. They're likely MIT licensed in accordance with the CLA.

Internal company copy of an MIT project? Unlikely unless legal says they are.

If the organization that I worked for made an internal copy of Influxdb ( https://github.com/influxdata/influxdb ), my contributions to the private and internally hosted copy are not inherently MIT licensed too and furthermore don't need to be redistributed.

If those changes were submitted upstream to the influxdata/influxdb repo, and I signed the CLA with them - then yes they would be.

What's more, if I left the organization, then I don't necessarily have a right to the contributions that I made to the private and internally hosted copy's codebase.

Re:Tell HN: GitHub will delete your private repo if you lose... by eyelidlessness on Wednesday February 01, 2023 @01:07AM (#34607056)
It doesn’t sound like we have any substantive disagreement other than potentially what GitHub’s role in it is or should be.
Re:Tell HN: GitHub will delete your private repo if you lose... by heleninboodler on Tuesday January 31, 2023 @08:12PM (#34604942)
> Your employment agreement disagrees.

Er, kinda presumptuous of you (and GitHub), no? None of my private repos, forks of other people's private repos, or other people's forks of my private repos are in any way governed by an employment agreement, and if they were, there's no way for GH to know what that agreement says.

Re:Tell HN: GitHub will delete your private repo if you lose... by Marsymars on Tuesday January 31, 2023 @07:28PM (#34604481)
> Companies of course have the right to manage access to their proprietary source code, for example by only giving access to corporate accounts under their control and reclaiming those accounts when an employee leaves.

This is how it should be done, but is too much overhead for many "IT as a cost centre" companies.

Re:Tell HN: GitHub will delete your private repo if you lose... by ssalka on Tuesday January 31, 2023 @07:56PM (#34604795)
Also, it would ruin my GitHub contributions graph
Re:Tell HN: GitHub will delete your private repo if you lose... by account42 on Wednesday February 01, 2023 @10:23AM (#34611722)
A simple script and a cron job will fix that problem.
Re:Tell HN: GitHub will delete your private repo if you lose... by masukomi on Wednesday February 01, 2023 @07:30PM (#34620311)
no need for a cron job

custom fake git history with this: https://github.com/artiebits/fake-git-history

Re:Tell HN: GitHub will delete your private repo if you lose... by therealdrag0 on Tuesday January 31, 2023 @10:18PM (#34605893)
It why would GitHub care to build functionality to behave how companies who aren’t paying them want it to behave?
Re:Tell HN: GitHub will delete your private repo if you lose... by vetrom on Wednesday February 01, 2023 @01:39AM (#34607242)
Any (quite relevant actually) discussion of SCM policy and management aside, you've got to remember: There is no 'cloud', it's just somebody else's computer.
Re:Tell HN: GitHub will delete your private repo if you lose... by madduci on Wednesday February 01, 2023 @06:33AM (#34609136)
So the main solution would be not forking, but cloning and straight create a separate project? Will it work?
Re:Tell HN: GitHub will delete your private repo if you lose... by snowwrestler on Wednesday February 01, 2023 @07:56AM (#34609780)
Simply saving a copy of the fork locally would be sufficient to keep a copy of it.
Re:Tell HN: GitHub will delete your private repo if you lose... by kevincox on Wednesday February 01, 2023 @09:34AM (#34610979)
Yes, I believe that if you push a repo to GitHub from a local copy instead of using their web-based "fork" feature it will not deduplicate the repositories. IDK if this affects your ability to submit pull requests though.
Re:Tell HN: GitHub will delete your private repo if you lose... by comprev on Wednesday February 01, 2023 @06:41AM (#34609207)
My client recently moved from GitLab (self hosted - many teams had their own isolated server) to GitHub.com and managing access for the thousands of developers has been a small headache. We were encouraged to use our personal GitHub accounts instead of making new ones.

They are promoting "internal open source", yet due to a wild variety of permissions, colleagues can't fork to their own space or push a branch for a PR. Chasing the repo owners or at least someone with authority to grant permission is rarely worth the hassle.