如何使用 curl 命令从artifactory 下载所有文件和文件夹?

如何使用 curl 命令从artifactory 下载所有文件和文件夹?

我们正在使用artifactory上传和下载项目依赖项。能够使用具有参数“--upload-file”的curl脚本上传所需内容。现在,我想从artifactory下载所需的文件和文件夹,是否有任何curl命令可以做到这一点?

有一个参数“-compressed”,我们可以用它压缩内容并得到解压后的内容作为输出。我试过了,但无法得到预期的结果。

以下是我使用过的命令:-

curl -k -u USERNAME:PASSWORD -H "Accept-Encoding: gzip" -i 
"https://ARTIFACTORY-URL/list/REPOSITORY-NAME/DEPENDENCIES-PATH5/

获取 HTML 格式的输出如下:-

Date: Thu, 05 Jul 2018 07:34:53 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
Server: Artifactory/5.9.1
X-Artifactory-Id: xxxxxxxxxxxxxx
X-Artifactory-Node-Id: prodmast
Access-Control-Allow-Methods: GET, POST, DELETE, PUT
Access-Control-Allow-Headers: X-Requested-With, Content-Type, X-Codingpedia
Cache-Control: no-store
Artifactory-UI-messages: []
SessionValid: false

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head><title>Index of REPOSITORY-NAME/DEPENDENCIES-PATH</title>
</head>
<body>
<h1>Index of REPOSITORY-NAME/DEPENDENCIES-PATH</h1>
<pre>Name                                  Last modified      Size</pre><hr/>
<pre>  <a href="../">../</a>
<a href="dpAddinNT/">dpAddinNT/</a>       04-Jul-2018 03:07    -
<a href="qlxLib/">qlxLib/</a>             04-Jul-2018 03:08    -
<a href="xiDplServer/">xiDplServer/</a>   04-Jul-2018 03:17    -
<a href="ADSlib.txt">ADSlib.txt</a>       22-May-2018 03:49   328 bytes
<a href="xyz.dll">xyz.dll</a>             25-May-2018 02:45   18.69 KB
<a href="abc.dll">abc.dll</a>             25-May-2018 02:45   18.19 KB
<a href="def.dll">def.dll</a>             25-May-2018 02:45   18.19 KB
<a href="ghi.dll">ghi.dll</a>             25-May-2018 02:45   18.19 KB

请在此提出建议....!!

相关内容