下载nexus工件(从原始存储库)

时间:2018-09-19 12:27:29

标签: curl nexus sonatype windows2012

我进行了很多搜索,但找不到合适的解决方案。从原始存储库(Nexus Sonatype)下载dll文件会产生错误。

Nexus版本为 OSS 3.13.0-01

我试图使用浏览器From the UI of nexus repository

下载文件

我尝试使用cURL,但它也会产生相同的错误。

C:\Users\admin\Desktop>curl -X GET -u admin "http://url/repository/repositoryname/test.dll"
Enter host password for user 'admin':
<html>
<head>
<title>File Download Blocked</title>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<meta name="viewport" content="initial-scale=1.0">
<style>
  #content {
    border:3px solid#aaa;
    background-color:#fff;
    margin:1.5em;
    padding:1.5em;
    font-family:Tahoma,Helvetica,Arial,sans-serif;
    font-size:1em;
  }
  h1 {
    font-size:1.3em;
    font-weight:bold;
    color:#196390;
  }
  b {
    font-weight:normal;
    color:#196390;
  }
</style>
</head>
<body bgcolor="#e7e8e9">
<div id="content">
<h1>File Download Blocked</h1>
<p>Access to the file you were trying to download has been blocked in accordance with company policy. Please contact your system administrator if you believe this is in error.</p>
<p><b>File name:</b> test.dll </p>

<script type="text/javascript">
<!--
function setCookie(name,value, expseconds)
{
var d=new Date();
d.setSeconds(d.getSeconds()+expseconds);
document.cookie=name+ "=" +escape(value)+ ((expseconds==null) ? "" : ";expires="+d.toUTCString());
}
-->
</script>
<noscript><h3 style="color:red; margin-top:0px; padding-top:0px;">This page requires Javascript. Please turn on Javascript.</h3></noscript>
Please click<input type="button" value="Continue" onClick="setCookie('PANID395251712', 1195897971, 30); window.location.href=window.location.href"> to download/upload the file.

</div>
</body>
</html>

Nexus存储库已安装在 windows 2012 R2 服务器中。我可以在服务器中下载工件。但是,当我尝试在本地计算机上下载工件时,会产生上述错误。 使用的cURL命令是

curl -X GET -u admin "http://ip:port/repository/repositoryname/test.dll"

我对联系不是陌生的,任何帮助将不胜感激。 谢谢。

0 个答案:

没有答案