ARTIFACTORY: Ancesstor of level 2 does not exist for manifest.json Error

AuthorFullName__c
Travis Ly
articleNumber
000006187
FirstPublishedDate
2024-09-18T10:53:53Z
lastModifiedDate
2025-05-21

ARTIFACTORY: Ancesstor of level 2 does not exist for manifest.json Error

Introduction
 

This document addresses an issue that occurs when attempting to list Docker repositories using the REST API. You may encounter the following error:

You may encounter the following error when running the List Docker Repositories REST API:

curl -u <USERNAME>:<PASSWORD>
https://<ART_URL>/artifactory/api/docker/REPO-KEY/v2/_catalog
{
   "errors": [
       {
           "status": 400,
           "message": "Ancesstor of level 2 does not exist for manifest.json."
       }
   ]
}


The error message "Ancestor of level 2 does not exist for manifest.json." indicates an issue with the way Docker image manifests are structured within the repository. This typically happens when Artifactory expects a specific manifest organization, but a required component is either missing or incorrectly positioned, preventing the Docker API from returning the expected results.

This error often occurs when a manifest.json file is placed at the root level of the repository. Each Docker image tag should have its own manifest file. When a manifest.json is incorrectly stored at the root level, it becomes unusable by the Docker client and leads to issues with the catalog API.

User-added image


Resolution 
To resolve this issue, locate the manifest.json file at the root level of the repository and remove it. The manifest.json should only be associated with image tags and not stored globally at the root level.
Once deleted, the API call should successfully list the repositories without the 400 error.

User-added imageUser-added image
 

curl -u <username>:<passsword> https://<ART-URL>/artifactory/api/docker/<REPO-KEY>/v2/_catalog


{
   "repositories": [
       "tomcat"
   ]
}