• MajorHavoc@programming.dev
    link
    fedilink
    arrow-up
    41
    arrow-down
    5
    ·
    edit-2
    4 months ago

    Misleading title.

    If my thing was public in the past, and I took it private, the old public code is still public.

    That’s… How the Internet works anyway.

    Edit: See Eager Eagle’s better explanation below.

    TL;DR - be careful who you allow to fork your private repos. And if you need to take a public repo, which has forks, private, consider archiving the repo and doing all the new work in a new repo. Which is arguably the reasonable thing to do anyway.

    Still a misleading title. This isn’t a way to break into all or even most of your private repositories.

    • morph3ous@lemmy.world
      link
      fedilink
      arrow-up
      18
      arrow-down
      1
      ·
      4 months ago

      That is not exactly what they are saying. You could create a private fork of a public repo and the code in your private fork is publicly accessible.

      • Eager Eagle@lemmy.world
        link
        fedilink
        English
        arrow-up
        15
        arrow-down
        1
        ·
        4 months ago

        I don’t think you can create private forks from public repos (the fork is public upon creation). This is more like the opposite:

        If there’s a private repo that is forked and the fork is made public, further changes to that original private repo become public too, despite the repo remaining private and the fork not being synced.

  • visor841@lemmy.world
    link
    fedilink
    arrow-up
    28
    arrow-down
    1
    ·
    edit-2
    4 months ago

    While this is still a massive problem, it does require a public fork at some point. So if you have a private repo that has never had a public fork, you should be safe.

  • youmaynotknow@lemmy.ml
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    4 months ago

    Just this week I migrated all my repos from github to Gitlab. And only because I can’t host my own gits just yet, but will do it soon enough.