0

Can anybody help me find a way to copy an artifact from one JFROG repository to another by using curl.

I found a way to send file to the repository

curl -u user:pass -X PUT 'http://artifactory:8081/artifactory/test-product/test.txt' -T filetosend.txt

To delete file from repository

curl -u user:pass -X DELETE 'http://artifactory:8081/artifactory/test-product/test.txt'

But I really don't know, how to move file from one repository to another. I do this

curl -u user:pass -X MOVE 'http:(slashes)artifactory:8081/artifactory/test-product/test.txt' 'http:(slashes)artifactory:8081/artifactory/test-release/test2.txt'

but it doesn't work.

I have tried different ways, but without any result.

Thank you very much in advance.

dice2011
  • 937
  • 2
  • 15
  • 30

2 Answers2

0

I solved this problem, the command should look like this curl -u login:password -X MOVE --header 'Destination:http://repo:8081/artifactory/test-release-local/test.txt' 'http://repo:8081/artifactory/test-snapshot-local/test.txt'

dice2011
  • 937
  • 2
  • 15
  • 30