首页 > 解决方案 > 下载 nexus 工件(来自原始存储库)

问题描述

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

Nexus 版本为OSS 3.13.0-01

我尝试使用浏览器从 nexus 存储库的 UI下载文件

我尝试使用 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"

我是nexus的新手,任何帮助将不胜感激。谢谢。

标签: curlnexussonatypewindows2012

解决方案


推荐阅读