ARTIFACTORY: Why do I get the error "Virtual repository must include only repositories from the same project it was created with"?

ARTIFACTORY: Why do I get the error "Virtual repository must include only repositories from the same project it was created with"?

AuthorFullName__c
Elina Floim
articleNumber
000005619
ft:sourceType
Salesforce
FirstPublishedDate
2023-03-13T11:00:22Z
lastModifiedDate
2023-03-13
VersionNumber
1

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

User-added image
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:

User-added image

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.
 
User-added image

More information on sharing repositories across projects can be found in this documentation section