GitHub2Forgejo icon indicating copy to clipboard operation
GitHub2Forgejo copied to clipboard

[feature request] Add Push Mirrors

Open cybardev opened this issue 7 months ago • 3 comments

Currently the repositories are mirrored as pull mirrors. I want them to be added as push mirrors (too).

The relevant endpoint in the Forgejo API is /repos/{owner}/{repo}/push_mirrors.

Since mirroring using SSH requires manually adding the SSH public key of each repository from Forgejo to GitHub, I think it's okay to just use the HTTP(S) URLs instead.

cybardev avatar Jul 22 '25 23:07 cybardev

Not sure if this is related, but I notice that repository description and topics are not migrated either.


Here's a repo I migrated manually (through Forgejo web UI):

  • Forgejo: Image
  • GitHub: Image

Here's one done through the script:

  • Forgejo: Image

  • GitHub: Image


The icon (notice the top-left corner of Forgejo screenshots) is also different, and the mirrors created by the tool say that it's a mirror (under the repo name). Maybe what I want is out of scope for this tool? Let me know if that is the case and I will close the issue. Thanks.

cybardev avatar Jul 23 '25 01:07 cybardev

Can you show me the exact UI that created that manual mirror?

Also I'm not sure if Forgejo actually lets you create bidirectional mirrors, if it does, then it should be in scope.

Regarding descriptions: That's actually interesting, I should add that + tag + etc mirroring too with a flag.

I'll get to these when I have the time.

RGBCube avatar Jul 23 '25 22:07 RGBCube

Apologies, I misremembered. For the nix-dotfiles repo I migrated the repo without setting up a pull mirror. Then just added the push mirror from the UI.

I just created a test repo on GitHub to try something, and it seems that bidirectional mirrors are indeed not possible. I can add a push mirror after adding a pull mirror (the reverse cannot be done), but even then the Forgejo instance will not have PRs.

I guess if I want to migrate repos as push mirrors, my best bet is to create a separate tool that does that?

I basically want to move activities away from GitHub (as much as feasible) and mainly keep it as a public mirror of my Forgejo instance, as backup and for sharing links.

cybardev avatar Jul 23 '25 23:07 cybardev