Share Repositories Across Multiple Projects

Share local and remote repositories across JFrog Platform Projects so multiple teams can access the same artifacts with role-based permissions.

Platform Admins can share local and remote repositories across multiple JFrog Projects so members in more than one project can access the repository. A classic use case is sharing an external remote repository (for example, DockerHub) with multiple projects. A repository can be shared with a single project or across all projects. Once shared, the repository is added to the target project(s) and tagged as Shared on the Repositories page. You can also share repositories with the REST API; see Share Repository with All Projects.

When you assign a resource to a project, the project owns and manages the resource. When you share a resource with a project, the project does not own the resource.

📘

Note

When you assign a resource to a project, the project owns and manages the resource. When you share a resource with a project, the project does not own the resource.

Shared Repository Rules and Guidelines

  • A repository can be shared only after it has been created.
  • Project members receive actions on the shared repository according to their roles and role actions in the target project.
  • Only the owner of the shared repository can delete it. Removing a shared repository from a project does not delete the repository.
  • The storage quota is calculated for the source repository of the shared repository.

How to Share a Repository

  1. Select the project. Then navigate to Administration | Repositories.

    Select Projects and navigate to [Project_Name] | Repositories if you use the classic navigation. Classic navigation is available for JFrog self-hosted customers with version 7.90 or previous only.

    shareRepo_09may22.png

  2. Click the Actions button and then click Share.

    shareRepo_09may22.png

  3. Choose how to share the selected repository:

    • Across all projects, by selecting Auto share with all projects, or select Read Only to share within project(s) in read-only mode so shared content cannot be modified.

    • Only with specific projects, by selecting the project name(s) from the projects list.

      share repositories_read_only.png

  4. Click Save.

You can also share a repository with a specific project using the Share Repository with Target Project API:

PUT <BASE_URL>/access/api/v1/projects/_/share/repositories/<REPO_KEY>/<TARGET_PROJECT_KEY>

Where:

  • <BASE_URL>: Your JFrog Platform base URL for the Access API
  • <REPO_KEY>: The repository key to share
  • <TARGET_PROJECT_KEY>: The project key that should receive access to the shared repository

For example:

PUT https://company.jfrog.io/access/api/v1/projects/_/share/repositories/dockerhub-remote/mobile-app

Related Topics


Did this page help you?