简体   繁体   中英

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 -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"
  2. How to choose repoKey and the path
  3. Why can't we use direct url to the file

I have a repository called maven-local, and uploaded an ear file called test.ear under the path com/test/jfrog.

We can use the below curl command directly to download the file.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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