curl - 下载 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的新手,任何帮助将不胜感激。谢谢。
解决方案
推荐阅读
- spring - 可以将 Content-Disposition 文件名用于 Spring Webclient 的多部分表单中的文本字段吗?
- symfony - 不自动装配时捆绑控制器中的错误
- c - 如何在我新制作的内核中启动 bash?
- python - 如何在情节跟踪中旋转文本?
- android - SAX 解析器在 Android Pie (9) 及更高版本中不起作用
- django - 通过 ManyToManyField 重新组合查询集
- ansible - 如何使用 tower-cli 安排工作
- python - 电子商人崩溃
- hbase - 鉴于对于 NoSQL DB 而言,连接通常很昂贵,什么是好的 Phoenix 用例
- r - 如何在R中的矩阵中上移每一列的值