I'm trying to upload artifacts using the following command:
jf rt upload "/local/dir/" my-repo/path/to/ --recursive --url my.artifactory.server.com --flat --access-token $JFROG_ACCESS_TOKEN
This works fine if the file doesn't exist in the specified location. But if a file already exists--I want to overwrite it, but I get the following error:
04:42:17 [Warn] [Thread 1] (Attempt 4) - Failure occurred while uploading to https://my.artifactory.server.com/artifactory/my-repo/path/to/file.pdf: server response: 404 Not Found
{
"errors" : [ {
"status" : 404,
"message" : "Could not locate artifact 'my-repo:path/to/file.pdf'."
} ]
}
04:42:17 [Info] [Thread 1] executor timeout after 3 attempts with 0 milliseconds wait intervals
04:42:17 [Error] server response: 404 Not Found
I found this answer to the same error that recommended jfrog rt c to store the credentials, but as far as I can tell that's an interactive command and I'm running this in a script so interactive isn't an option.
Is there a way to fix this issue?
Edit: Just tested and I get the same error with jf rt del. I can upload the artifact (if it doesn't already exist) with jf rt upload and I can find it with jf rt s, so it definitely exists. Would this be a permissions issue? Maybe I don't have permissions to delete?
I configurned CLI with Access Token and it is working fine. I have a file already present now I tried to upload the same file(to override), Also, I have added one more file to check if old and new files are getting uploaded succssfully.
My CLI version is 2.54.0 My Artifactory version is 7.81.2 Maybe you are testing in lower versions of CLI/Artifactory.
