JetBrains Space Help

Create a Repository

To create a repository

  1. Navigate to the project in which you want to create a repository.

  2. On the project sidebar, choose Repositories.

  3. On the repositories page, click Create new repository:

    createRepository.png
  4. From the drop-down menu, select one of the followng options:

  5. Fill out the form (follow the instructon below that corresponds to the option you have selected). When you're done filling out the form, click Create.

New Space Repository

createRepoForm-NewSpaceRepository.png
  • Repository name

    Give your new repository a name and optional description. The name can match or resemble the project name, however two repositories in the same project should not have the same name.

  • Initialize repository

    Check this option if you have no existing code and are staring from scratch. Space will make an initial commit and create system file templates (.gitignore, README.md).

    Uncheck this option if you are going to push existing code from a local source and want your repository empty.

  • Enable default push restrictions

    When enabled, the following restrictions will be applied:

    • Authenticate committer

    • Maximum file size is 256 kb

    • Forbidden files: id_rsa

    You can disable or change these restrictions after creating the repository on the Repository Settings page.

  • Default branch name

    Name your default branch (e.g. main, master, base)

New Migration

createRepoForm-NewMigration.png
  • Repository name

    Give your new Soace repository a name and optional description. The name can match or resemble the project name, however two repositories in the same project should not have the same name.

  • Remote repository URL

    Enter the URL of the external repository you want to import to Space.

  • Credentials

    Enter the credentials required to access the external repository. Depending on your external repository access policy, you may need to provide either an SSH key or your username/password. Choose Anonymous if no credentials are required to access your external repository.

    The credentials you provide will be used only once and will not be stored in Space.

External Mirror

createRepoForm-ExternalMirror.png
  • Repository name

    Give your Space mirror repository a distinctive name and optional description. The name should not necessarily match your remote source repository name.

  • 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.

  • Git refspec

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

  • Credentials

    Enter the credentials required to access the remote repository. Depending on remote repository access rules, you may need to provide either an SSH key or your username/password. Choose Anonymous if no credentials are required.

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

For more information about mirroring, see Mirror a Repository

GitHub Mirror

createRepoForm-GitHubMirror.png
  • Repository name

    Give your Space mirror repository a distinctive name and optional description. The name should not necessarily match your GitHub repository name.

  • GitHub repository name

    Provide your GitHub repository name in the format: owner/repository.

  • Specify synchronization settings:

    • 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.

  • Git refspec

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

  • Credentials

    Enter the credentials required to access the remote GitHub repository. Depending on your GitHub repository access rules, You ca provide either your GitHub tocken or your username/password.

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

For more information about mirroring, see Mirror a Repository

After you created a repository, you can:

Last modified: 07 October 2021