jfrog-cli
jfrog-cli copied to clipboard
Add --ignore-existing option to rt upload command
Is your feature request related to a problem? Please describe. I want to be able to only upload non-existing files on artifactory automatically (scripted) but with the possibility to overwrite files manually (if passed an option or prompted)
Describe the solution you'd like to see Add the --ignore-existing option (like the rsync one)
Describe alternatives you've considered Set the delete rights, but I sometimes want to be able to overwrite files from my scripts
Additional context None
@FederAndInk Thanks for using the JFrog CLI.
The JFrog CLI already kind of does this automatically today. When a file already exists in Artifactory, the JFrog CLI doesn’t re-upload its body. Instead, it sends a PUT request with the file’s checksum before attempting to upload. If the file already exists in Artifactory, Artifactory updates the modification time.
Read more about the Checksum Deploy API at https://jfrog.com/help/r/jfrog-rest-apis/deploy-artifact-by-checksum. Please let me know if that helps.
Hello, thanks for the quick answer, unfortunately, this is not my use case, I was probably not specific enough.
The issue is when we have 2 files with the same name but with a different content, the --ignore-existing allows to not overwrite the files (or maybe some other option that can report if a file already exists and does not match the checksum)
I'd appreciate this feature and was kind of baffled to find out this is currently really only possible by managing permissions. Which is clunky and I'd much rather have a non-overwrite default with this flag to force it if I really have to. Right now we work around this by coding around it :/
EDIT: Duplicate of #1488