# \[solved\] Automated mirroring of Gitea to Gitea

**URL:** <https://forum.gitea.com/t/solved-automated-mirroring-of-gitea-to-gitea/717>\
**Category:** Install/Maintain/Configure\
**Created:** [November 26, 2018, 12:23pm UTC](https://forum.gitea.com/t/solved-automated-mirroring-of-gitea-to-gitea/717 "2018-11-26T12:23:14Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrinux](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/adrinux/32/4741_2.png) [@adrinux](https://forum.gitea.com/u/adrinux)\
**Post date:** [November 26, 2018, 12:23pm UTC](https://forum.gitea.com/t/solved-automated-mirroring-of-gitea-to-gitea/717/1 "2018-11-26T12:23:14Z")

</div>

There are github issues about mirroring from github and gitlab etc into gitea, but I’ve not yet seen anyone talk about automated mirroring of one gitea instance to another.

My personal use case is mirroring my main remote gitea instance repos to repos running on my home server. So far I’ve been setting up a mirror on the my home server manually for each new repo I create on the remote. But that’s tedious…and I’ve gotten a bit behind.

It looks like most of the required features already exist in the gitea API. Has anyone done this via script or whatever?

---

<div class="post-metadata">

**Author:** ![techknowlogick](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/techknowlogick/32/4706_2.png) [@techknowlogick](https://forum.gitea.com/u/techknowlogick)\
**Post date:** [November 26, 2018, 4:26pm UTC](https://forum.gitea.com/t/solved-automated-mirroring-of-gitea-to-gitea/717/2 "2018-11-26T16:26:07Z")

</div>

Yup, automated mirror is possible. I have a script that does a one-off mirror from GitHub to Gitea, but could be updated to do Gitea-\>Gitea, and maybe if you run it on a cron then it will pick up new repos that haven’t been mirrored yet.

My script is here: [https://gist.github.com/techknowlogick/c2367e03baff9f16b3c5cc9d9a5d13ca](https://gist.github.com/techknowlogick/c2367e03baff9f16b3c5cc9d9a5d13ca)

---

<div class="post-metadata">

**Author:** ![adrinux](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/adrinux/32/4741_2.png) [@adrinux](https://forum.gitea.com/u/adrinux)\
**Post date:** [November 27, 2018, 10:58am UTC](https://forum.gitea.com/t/solved-automated-mirroring-of-gitea-to-gitea/717/3 "2018-11-27T10:58:09Z")

</div>

Thanks. Will look into it.

---

<div class="post-metadata">

**Author:** ![anon74399538](https://avatars.discourse-cdn.com/v4/letter/a/c6cbf5/32.png) [@anon74399538](https://forum.gitea.com/u/anon74399538)\
**Post date:** [December 7, 2018, 9:07am UTC](https://forum.gitea.com/t/solved-automated-mirroring-of-gitea-to-gitea/717/4 "2018-12-07T09:07:09Z")

</div>

Curious if you were able to land this feature if you’ve come around to it, @adrinux. Looking forward to v2 of your hugo starter. 😺

---

<div class="post-metadata">

**Author:** ![adrinux](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/adrinux/32/4741_2.png) [@adrinux](https://forum.gitea.com/u/adrinux)\
**Post date:** [December 7, 2018, 12:00pm UTC](https://forum.gitea.com/t/solved-automated-mirroring-of-gitea-to-gitea/717/5 "2018-12-07T12:00:42Z")

</div>

I forked techknowlogick’s gist into a repo, but haven’t had chance to look at it properly. [https://github.com/adrinux/gitea-mirror-gitea](https://github.com/adrinux/gitea-mirror-gitea)

Would be nice to add config files and command line flags.

---

<div class="post-metadata">

**Author:** ![anon74399538](https://avatars.discourse-cdn.com/v4/letter/a/c6cbf5/32.png) [@anon74399538](https://forum.gitea.com/u/anon74399538)\
**Post date:** [December 8, 2018, 3:12pm UTC](https://forum.gitea.com/t/solved-automated-mirroring-of-gitea-to-gitea/717/6 "2018-12-08T15:12:44Z")

</div>

Might be able to cajole that into [warp](https://github.com/dgiagio/warp) and write the cli in bash to make it more portable.

---

<div class="post-metadata">

**Author:** ![adrinux](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/adrinux/32/4741_2.png) [@adrinux](https://forum.gitea.com/u/adrinux)\
**Post date:** [December 11, 2018, 10:45am UTC](https://forum.gitea.com/t/solved-automated-mirroring-of-gitea-to-gitea/717/7 "2018-12-11T10:45:27Z")

</div>

Since it’s already written in go I’d assumed using Cobra (for cli) and Viper (for config files) would be doable. May be beyond my current talents/time availability though. Warp seems unnecessary?

---

<div class="post-metadata">

**Author:** ![anon74399538](https://avatars.discourse-cdn.com/v4/letter/a/c6cbf5/32.png) [@anon74399538](https://forum.gitea.com/u/anon74399538)\
**Post date:** [December 14, 2018, 8:34am UTC](https://forum.gitea.com/t/solved-automated-mirroring-of-gitea-to-gitea/717/8 "2018-12-14T08:34:06Z")

</div>

The advantage of Warp is language agnosticism. The necessity depends on the language of greatest comfort (e.g. Node or bash wrappers, if desired). If you’re a purist the spf13 tools make the most sense. But there are options.

---

<div class="post-metadata">

**Author:** ![VitaliyAT](https://avatars.discourse-cdn.com/v4/letter/v/958977/32.png) [@VitaliyAT](https://forum.gitea.com/u/VitaliyAT)\
**Post date:** [October 19, 2019, 3:40pm UTC](https://forum.gitea.com/t/solved-automated-mirroring-of-gitea-to-gitea/717/9 "2019-10-19T15:40:00Z")

</div>

Any news about this theme?

---

<div class="post-metadata">

**Author:** ![somera](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/somera/32/641_2.png) [@somera](https://forum.gitea.com/u/somera)\
**Post date:** [July 11, 2020, 10:32pm UTC](https://forum.gitea.com/t/solved-automated-mirroring-of-gitea-to-gitea/717/10 "2020-07-11T22:32:15Z")

</div>

Is there a way to move the mirroered repo to other organization?

---

<div class="post-metadata">

**Author:** ![techknowlogick](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/techknowlogick/32/4706_2.png) [@techknowlogick](https://forum.gitea.com/u/techknowlogick)\
**Post date:** [August 6, 2020, 6:03pm UTC](https://forum.gitea.com/t/solved-automated-mirroring-of-gitea-to-gitea/717/11 "2020-08-06T18:03:32Z")

</div>

yes, if you go to repo settings for the mirror there is an option to “transfer ownership” of the repo.

---

<div class="post-metadata">

**Author:** ![techknowlogick](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/techknowlogick/32/4706_2.png) [@techknowlogick](https://forum.gitea.com/u/techknowlogick)\
**Post date:** [August 6, 2020, 6:03pm UTC](https://forum.gitea.com/t/solved-automated-mirroring-of-gitea-to-gitea/717/12 "2020-08-06T18:03:35Z")

</div>

Closed on August 6, 2020, 6:03pm UTC


