简体   繁体   English

如何使用 curl 命令从 jFrog 存储库下载文件

[英]How to download files from jFrog repository using curl command

I'm trying to download.EAR file from jFrog artifactory using curl command and save it on to the server.我正在尝试使用 curl 命令从 jFrog 工件下载 .EAR 文件并将其保存到服务器上。

curl -k -b "/appl/webappl/server/cookie.txt" "https://jfrog.dev.com/ui/v1/download?repoKey=key&path=path%252Ffile.ear" -o "/appl/webappl/server/file.ear"

Questions:问题:

  1. How to select this specific url from dev tools on browser "https://jfrog.dev.com/ui/v1/download"如何从浏览器“https://jfrog.dev.com/ui/v1/download”上的开发工具中获取 select 这个特定的 url
  2. How to choose repoKey and the path如何选择 repoKey 和路径
  3. Why can't we use direct url to the file为什么我们不能直接使用 url 到文件

I have a repository called maven-local, and uploaded an ear file called test.ear under the path com/test/jfrog.我有一个名为 maven-local 的存储库,并在路径 com/test/jfrog 下上传了一个名为 test.ear 的 ear 文件。

We can use the below curl command directly to download the file.我们可以直接使用下面的 curl 命令下载文件。

curl -u "user:password" -X GET https://myartifactory.jfrog.io/artifactory/maven-local/com/test/jfrog/test-test.ear -H 'Content-Type:application/json' -o test.ear

Please clarify if I am missing something.请澄清我是否遗漏了什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM