How to Mirror
    • Dark
      Light
    • PDF

    How to Mirror

    • Dark
      Light
    • PDF

    Article summary

    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

    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

    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

    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

    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

    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

    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

    API Mirroring

    We have a few API calls to configure and execute mirroring.
    Mirror Sync
    Get push mirrors
    Add push mirrors
    Sync push mirrors
    Get push mirror by name
    Delete push mirror

    References

    Gitea mirror documentation
    Github authentication


    Was this article helpful?