JetBrains Space Help

Mirror a Repository

Repository mirroring in Space allows you to create and maintain a synchronized copy of a repository hosted outside of Space.

You can set up mirroring if:

  • You want to access a remotely hosted repository from Space to browse its code base and create code reviews.

  • You prefer not to move your repository from its existing hosting to Space, but have a fully functioning, synchronized copy instead. This can be the first step of a gradual migration process.

  • You want to fork a remote repository by mirroring specific branches. For example, you mirror a remote repository's master and create local branches off of it in Space. Now you can push to your branches and keep them updated by rebasing them onto master, all without affecting the remote repository.

To set up a mirror of a remote repository, you need to create a repository in Space and provide necessary parameters:

  • Remote repository URL— enter the URL of the target remote repository (hosted outside of Space).

  • Choose updating options for your mirror:

    • Check remote repository periodically— the mirror will be synced with the remote repository and updated approximately once an hour. Actual update frequency may vary as it depends on server load.

    • Check remote repository on fetch— the mirror will be synced with the remote repository every time someone runs the git fetch command.

    Both options can be selected.

  • Allow push to proxy— commits will be pushed to the remote repository when pushed to the mirror.

  • Git refspec— using refspec mapping, specify the branches that should be mirrored and synced. Leave the field blank to sync all branches.

  • Credentials— enter credentials required to access the remote repository.

    The credentials will be stored in Space and used to synchronize the repository.

To edit mirroring options, navigate to Repository Settings.

Last modified: 12 May 2020