ARTIFACTORY: How to fix 'Repository sync is disabled' error with federated repositories
Identifying the issueIn case you encounter one of the below errors with the Federated Repository setup, this might be related to a Known Issue which can be fixed by executing an API:
“Repository sync is disabled” in the federation UI:
“Found disabled member cargo-local, no heartbeat will be sent.”
“Found a disabled member https://server-name.jfrog.io/artifactory/cargo-local, not sending heartbeat for this one”
The error in the terminal might look as follows:
Failed to add the following remote repositories to the federation:\nhttps://servername.jfrog.io/artifactory/repository-name: Validation of federated repository failed: cannot be added to the federation as it is a member of another federation
Fixing the issueTo fix this problem, execute the below REST API:
curl -u <ADMIN-USER> -X POST "https://<server-name>.jfrog.io/artifactory/api/federation/repos/enable" -H "Content-type: application/json" --data '["*"]'
The expected output should be:
Repos of type [*] enabled.
The above API will re-enable the fed members for all repo types.
The “*” in the array is a wildcard to re-enable all Federated repositories regardless of repository type (Docker, Helm, etc). It can be replaced with repository types, for example:
["Alpine", "generic", "conan", "docker", "maven", "npm", "yum"]