--- title: "How to mirror" slug: "how-to-mirror" description: "Interested in mirroring your repository? View our detailed walk-through here." updated: 2023-03-22T16:31:38Z published: 2023-03-22T16:31:38Z canonical: "learn.allspice.io/how-to-mirror" --- > ## Documentation Index > Fetch the complete documentation index at: https://learn.allspice.io/llms.txt > Use this file to discover all available pages before exploring further. # How to Mirror You may be interested in mirroring your repository from an external repo to an AllSpice Hub repo or the other way around, from an AllSpice Hub repo to an external repo. Either way, we'll show you how. ## Add push mirror from AllSpice to external hosting Visit your repository. Click on the "Settings" tab and select the "repository" sub category ![Screen Shot 2022-10-26 at 4.06.01 PM.png](https://cdn.document360.io/3d44af5c-3f49-4ca5-b152-10836a885c13/Images/Documentation/Screen%20Shot%202022-10-26%20at%204.06.01%20PM%281%29.png) Scroll to the mirror settings section. Fill out the git remote repository url. Fill out the Authorization Username and Password. You may have to use an authorization token instead of a password. See your host for more details. Fill out the Mirror Interval time, 8h1m10sec will set the interval to 8 hours, 1 minute, and 10 seconds. Set this to 0 to disable automatic sync. Click the "Add Push Mirror" button to add the push location. ![Screen Shot 2022-10-26 at 4.15.51 PM.png](https://cdn.document360.io/3d44af5c-3f49-4ca5-b152-10836a885c13/Images/Documentation/Screen%20Shot%202022-10-26%20at%204.15.51%20PM.png) After the mirror has been set up, you can manually trigger a mirror by clicking on the "Synchronize Now" button. ![Screen Shot 2022-10-26 at 4.46.37 PM.png](https://cdn.document360.io/3d44af5c-3f49-4ca5-b152-10836a885c13/Images/Documentation/Screen%20Shot%202022-10-26%20at%204.46.37%20PM.png) ## Add pull mirror from external hosting to AllSpice Click on the "+" button in the upper right corner of the menu (next to your user avatar button). Select New Migration. ![Screen Shot 2022-10-26 at 4.23.14 PM.png](https://cdn.document360.io/3d44af5c-3f49-4ca5-b152-10836a885c13/Images/Documentation/Screen%20Shot%202022-10-26%20at%204.23.14%20PM.png) Select the git host. If you are not using one of the listed providers, use the generic git option to migrate a repository from any git service. ![Screen Shot 2022-10-26 at 4.24.13 PM.png](https://cdn.document360.io/3d44af5c-3f49-4ca5-b152-10836a885c13/Images/Documentation/Screen%20Shot%202022-10-26%20at%204.24.13%20PM.png) Fill out the source repo name, your username and password for the service. Click on "this repository will be a mirror". Fill out the rest of the dialog and click the "Migrate Repository" button. ![Screen Shot 2022-10-26 at 4.26.14 PM.png](https://cdn.document360.io/3d44af5c-3f49-4ca5-b152-10836a885c13/Images/Documentation/Screen%20Shot%202022-10-26%20at%204.26.14%20PM.png) Your repo should now be a mirrored from the remote host. You can check in Settings->Repository->Mirror settings ![Screen Shot 2022-10-26 at 4.37.45 PM.png](https://cdn.document360.io/3d44af5c-3f49-4ca5-b152-10836a885c13/Images/Documentation/Screen%20Shot%202022-10-26%20at%204.37.45%20PM.png) ## API Mirroring We have a few API calls to configure and execute mirroring. [Mirror Sync](https://hub.allspice.io/api/swagger#/repository/repoMirrorSync) [Get push mirrors](https://hub.allspice.io/api/swagger#/repository/repoListPushMirrors) [Add push mirrors](https://hub.allspice.io/api/swagger#/repository/repoAddPushMirror) [Sync push mirrors](https://hub.allspice.io/api/swagger#/repository/repoPushMirrorSync) [Get push mirror by name](https://hub.allspice.io/api/swagger#/repository/repoGetPushMirrorByRemoteName) [Delete push mirror](https://hub.allspice.io/api/swagger#/repository/repoDeletePushMirror) ## References [Gitea mirror documentation](https://docs.gitea.io/en-us/repo-mirror/) [Github authentication](https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls)