# Mirror Gitea repo to Github

**URL:** <https://forum.gitea.com/t/mirror-gitea-repo-to-github/2085>\
**Category:** Install/Maintain/Configure\
**Created:** [April 13, 2020, 5:49am UTC](https://forum.gitea.com/t/mirror-gitea-repo-to-github/2085 "2020-04-13T05:49:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiwi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/kiwi/32/4916_2.png) [@kiwi](https://forum.gitea.com/u/kiwi)\
**Post date:** [April 13, 2020, 5:49am UTC](https://forum.gitea.com/t/mirror-gitea-repo-to-github/2085/1 "2020-04-13T05:49:35Z")

</div>

Hi all, I’m curious if there’s anyway to have a repo in github that is just a mirror of a repo in my gitea instance? Basically I want to do the opposite of mirroring a github repo. Is it possible or would I just have to manually push to both? Thank you ^^

---

<div class="post-metadata">

**Author:** ![sudipto](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/sudipto/32/4825_2.png) [@sudipto](https://forum.gitea.com/u/sudipto)\
**Post date:** [April 19, 2020, 2:56am UTC](https://forum.gitea.com/t/mirror-gitea-repo-to-github/2085/2 "2020-04-19T02:56:15Z")

</div>

@kiwi it is pretty easy to do it with Gitea. To mirror your Gitea repository, carry out the following steps:

- Register for the GitHub Developer Program, then go to the Settings page on GitHub and generate a personal access token with the repo scope.

- Create a repository on GitHub.

- Go to the settings of your Gitea repository and navigate to the Git Hooks section.

- Edit the post-receive hook and populate the text area with the script given below:

- Click on Update Hook and push to the Gitea repository.

- You will likely receive the following message on the terminal if the GitHub mirror was updated successfully:

Hope it works for you!
