-
Notifications
You must be signed in to change notification settings - Fork 34
How to mirror into an organization instead of an user #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey 👋 I am having a look if this would be easily possible. |
+1 |
Thanks a lot, sorry for the late reply! |
I'd love to see this feature as well, thanks for checking, more versatil output settings would be awesome! |
+1 |
++1 |
Hey I made something similar for the starred repos in my github account where all starred repos are moved into a organisation if the user wants. There is a PR out for it |
Yes, it's absolutely possible to mirror repositories to a specific organization in Forgejo, even though you can only generate tokens for users. The mirror-to-gitea tool has a feature specifically for this purpose. You can use the docker run -it --rm \
-e GITHUB_USERNAME="your-github-username" \
-e GITEA_URL="https://your-forgejo-instance-url" \
-e GITEA_TOKEN="your-user-token-from-forgejo" \
-e GITHUB_TOKEN="your-github-token" \
-e GITEA_ORGANIZATION="RetroDECK" \
-e MIRROR_ORGANIZATIONS="true" \
-e DRY_RUN="true" \
arunavo4/mirror-to-gitea:latest This command will:
Important notes:
If you want to preserve the organization structure from GitHub (i.e., keep the repositories in the same organization structure), you can add:
If you only want to mirror the RetroDECK organization repositories and not your personal repositories, you can use:
Full example with all options: docker run -it --rm \
-e GITHUB_USERNAME="your-github-username" \
-e GITEA_URL="https://your-forgejo-instance-url" \
-e GITEA_TOKEN="your-user-token-from-forgejo" \
-e GITHUB_TOKEN="your-github-token" \
-e GITEA_ORGANIZATION="RetroDECK" \
-e MIRROR_ORGANIZATIONS="true" \
-e ONLY_MIRROR_ORGS="true" \
-e INCLUDE_ORGS="RetroDECK" \
-e PRESERVE_ORG_STRUCTURE="true" \
-e DRY_RUN="true" \
arunavo4/mirror-to-gitea:latest Let me know if you need any further assistance! |
Greetings,
first of all, thank you for this software, it's really making the life easier!
I am using this mirrot to migrate my RetroDECK organization inside my own forgejo instance, however I noticed that in forgejo I can only generate tokens for users and not for organization so the destination of the mirroring is the user, I wish them to be migrated inside an organization named RetroDECK.
Is it possible?
Thanks in advance.
The text was updated successfully, but these errors were encountered: