ARTIFACTORY: Why do I get the error “Virtual repository must include only repositories from the same project it was created with”?
In some cases, attempts to change the configuration of a virtual repository that is part of a project may result in an error message stating:
Failed to update repository <REPO_NAME>: Virtual repository must include only repositories from the same project it was created with
This error indicates that one (or more) of the aggregated repositories are not shared with the project in which the virtual repository was created. This can happen, for example, if the virtual repository contains repositories that were originally shared with this project but were later unshared at some point.
In this case, it is required to go through the list of aggregated repositories (local, remote, and virtual) and confirm which are not shared with the project. This can be confirmed by checking at the "Shared With" section of each repository:
By clicking on the number, you may configure the projects with which the repository is shared. It has to be confirmed if the repository is shared with the project where the virtual repository was created, and if it is not, it needs to be shared with the relevant project.
More information on sharing repositories across projects can be found in this documentation section.