Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

artifactory 404 artifact not found

I'm using curl to deploy an artifact to a repository and on the initial PUT the artifact successfully gets deployed to the repo. When I try to PUT the same artifact to the same repo I get a 404 "Could not locate artifact". If I go through the UI I can deploy the same artifact to the same repo and everything works.

Any ideas?

like image 803
user2762571 Avatar asked Feb 13 '15 20:02

user2762571


People also ask

What does Artifactory do when a required package is not found?

If a package is not found in those repositories, Artifactory will merge metadata from the repositories that have not been set with the Priority Resolution field.

What is Artifactory artifact?

Artifactory is a branded term to refer to a repository manager that organizes all of your binary resources. These resources can include remote artifacts, proprietary libraries, and other third-party resources. A repository manager pulls all of these resources into a single location.

What is Zap cache in Artifactory?

"Zapping" a cache means forcing the Retrieval Cache Period and Missed Retrieval Cache Period to time out. To "zap" a cache, in the Artifacts module Tree browser, Select the repository cache you wish to "zap" and click Zap caches in the right-click menu or Actions drop-down menu.


1 Answers

This can happen in a situation when:

  1. The user you are using for deployment lacks delete permissions for the target repository
  2. Artifactory is configured to "Hide existence of unauthorized resources" (Admin->Security->General)

In such a case, for the first deployment the user has all the required permissions (deploy) and therefore the initial deployment succeeds.
For the second deployment, the user needs delete permissions in order to override the existing artifact. This would normally fail with a 403 status and the following message: "Not enough permissions to overwrite artifact". However, when "Hide existence of unauthorized resources" is checked you get will get a 404 since the deployment operation is unauthorized.

Granting the deploying user delete permission on the target repository should solve this problem (Admin->Security->Permissions).

like image 133
Dror Bereznitsky Avatar answered Nov 15 '22 20:11

Dror Bereznitsky