我正在尝试将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"
请说明如何解决此问题