Skip to content

Create a new repository when pushing an image#

By default, MSR only allows users to push images to repositories that already exist, and for which the user has write privileges. Alternatively, you can configure MSR to create a new private repository when an image is pushed.

To create a new repository when pushing an image:

  1. Log in to the MSR web UI.

  2. In the left-side navigation panel, click Settings and scroll down to Repositories.

  3. Slide the Create repository on push toggle to the right.

  4. Push an image to a non-existing repository:

    curl --user <admin-user>:<password> \
    --request POST "<msr-url>/api/v0/meta/settings" \
    --header "accept: application/json" \
    --header "content-type: application/json" \
    --data "{ \"createRepositoryOnPush\": true}"
    

Pushing an image to a non-existing repository will create a new repository using the following naming convention:

  • Non-admin users: <user-name>/<repository>
  • Admin users: <organization>/<repository>