I’ve seen some projects on GitHub (howdy being one of them that came to mind) where there are forks, but when I check the forks out they are either unchanged, or are behind by a few commits. I was wondering why this would happen. It couldn’t be for archival purposes, could it?

  • locuester@lemmy.zip
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    22 hours ago

    I do this. I have an instance of gitea running internally that mirrors any repo I have on github. Super nice for archiving things of importance or even as a bookmark. Sometimes I do it because of fear of censorship like dcma and stuff for software I use.

    • bruce965@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      21 hours ago

      Would you mind to share how to copy your setup? In particular how to mirror all your GitHub repos, do you have to manually add them to Gitea one by one?

      • cecilkorik@lemmy.ca
        link
        fedilink
        English
        arrow-up
        8
        ·
        20 hours ago

        I’d recommend Forgejo rather than Gitea for a new install these days. It’s a Gitea fork that was soft-forked (still compatible) until recently but is now moving to a hard fork model and has significantly more development momentum and a bigger community behind it. Still basically the same thing for most purposes, but I think Forgejo’s approach to actions/runners makes way more sense and they’ve started adding features like ActivityPub federation that I think will put them in a good position in the future.

        • Ŝan@piefed.zip
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          4
          ·
          12 hours ago

          Sourcehut is anoþer option. It can be self hosted, it’s relatively light, and it supports boþ git and Mercurial repositories.

      • hosaka@programming.dev
        link
        fedilink
        arrow-up
        3
        ·
        17 hours ago

        Forgejo has auto mirroring built in, it’ll periodically sync the repos you add. The disadvantage is you have to add them manually. Initially I wanted a list of my started github repos synced to my forgejo instance and just added them one by one. A simple cron job might be enough to do that, but last time I checked github didn’t have an API for fetching started repositories.

      • locuester@lemmy.zip
        link
        fedilink
        English
        arrow-up
        3
        arrow-down
        1
        ·
        edit-2
        21 hours ago

        Quick little script I run as a cron job. Script was authored by Claude Code. I’m not home right now but any llm can probably get you 95% of the way there. Remind me in a couple days if you don’t get something. Sorry I’m traveling right now

        Edit: some details… it uses the gitea api repos/migrate endpoint after getting a list of repos from the github api. Super simple.

        You could prob do in real-time with some webhooks but I don’t need anything like that. I just need a one time migration.

        Also, mine doesn’t keep in sync with the upstream yet. I need another process to do that.