0

任何人都可以帮助我找到一种方法,使用 curl 将工件从一个 JFROG 存储库复制到另一个存储库。

我找到了一种将文件发送到存储库的方法

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

从存储库中删除文件

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

但我真的不知道如何将文件从一个存储库移动到另一个存储库。我这样做

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

但它不起作用。

我尝试了不同的方法,但没有任何结果。

非常感谢您提前。

4

2 回答 2

1

您应该使用移动 REST API: https ://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-MoveItem

路径应如下所示:

curl -u user:pass -X POST ' http://artifactory:8081/artifactory/api/move/libs-release-local/org/acme?to=/ext-releases-local/org/acme-new&dry=1 '

于 2017-03-19T10:08:36.010 回答
1

我解决了这个问题,命令应该看起来像这样 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 '

于 2017-03-19T15:01:03.430 回答