Platform Admins can share local and remote repositories across multiple projects to allow members in more than one project to have access to the repository. A classic use case for sharing a repository is the need to share an external remote repository (for instance, DockerHub)with multiple projects. A repository can be shared with a single project or across all projects. Once the repository is shared, it is added to the target project/s and tagged as Shared in the Repositories page. In addition to the managing shares in the UI, you can also set share projects using the REST API. For more information, see Share Repository with All Projects.
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 Repositories Rules and Guidelines
A Repository can be shared only after it has been created.
Project Members are granted actions to the shared repo according to their Roles and Role actions assigned in the target project.
Only the owner of the shared repository can delete the shared repository. A Shared repository can be removed from the project, but this will not trigger the deletion of the repository.
The Storage Quota is calculated for the source repository of the shared repository.
To share a repository:
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.
Click the Actions button and then click Share.
You have the option to share the selected repository:
Across all the projects, by selecting the Auto share with all projects field or select Read Only to share repositories within a Project/s in Read-Only mode to avoid any changes or modifications of the shared content.
Only with specific projects, by selecting the project name(s) from the projects list.
Click Save.