如何将artifactory中的工件复制到特定的存储库?

时间:2016-07-11 12:17:42

标签: file powershell download artifactory

我正在尝试将artifactory中存在的工件复制到另一个存储库,我使用powershell代码,如source是artifactory路径,目标是repo路径,但是我面临着带有“2”参数问题的downloadfile错误。

$Source = "artifactory/test/sample.zip"; 
$Dest= "repo/infra/test/admin.zip"; 
$Usr="---" 
$pwd="----" 
$webclient=New-Object System.Net.Webclient 
$webclient.credentials=New-Object System.Net.NetworkCredentials($usr,$Pwd) 
$webclient.DownloadFile($src,$dest) 

运行上述代码后出错

Exception calling "DownloadFile" with 2 arguments " An exception occurred during webclient request"

请说明如何解决此问题

0 个答案:

没有答案