使用ant/ivy从nexus检索依赖之间的http身份验证? [英] http authentication between using ant/ivy retrieving dependency from nexus?

查看:19
本文介绍了使用ant/ivy从nexus检索依赖之间的http身份验证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 ivy 运行 ant 时尝试从 nexus 存储库检索依赖项时遇到问题.依赖项永远不会解决,当使用详细输出运行时,可疑行是 '[ivy:retrieve] authentication: k='@' c='null'.

I have an issue when attempting to retrieve a dependency from a nexus repository when running ant with ivy. the dependency is never resolved, when running with verbose output the suspect line is '[ivy:retrieve] authentication: k='@' c='null'.

我尝试了许多不同的向ivy提供凭据配置的变体,但没有改变结果.更奇怪的是,repo 主机名似乎来自解析器,而不是来自提供的凭据.

I have tried many different variations of providing the credentials configuration to ivy, but without changing the result. Stranger still the repo hostname appears to come from the resolver, not from the provided credentials.

版本 - ANT@1.7.1、IVY@2.1.0、JDK@1.6.0_20

Versions - ANT@1.7.1, IVY@2.1.0, JDK@1.6.0_20

有一个注释确保类路径中的 commons-httpclient 允许 http 身份验证,我确定是这样,尽管无法明确确认.

There was a note to ensure that commons-httpclient in on the classpath to allow http authentication, which I am sure it is, although have been unable to confirm explicitly.

非常感谢任何帮助.

推荐答案

您是否收到 HTTP 401 错误?这表明用于登录 Nexus 的凭据存在问题.

Are you getting a HTTP 401 error? That would indicate problems with the credentials being used to login to Nexus.

可以通过添加 credentials 条目来修复在您的常春藤设置文件中:

Can be fixed by adding a credentials entry in your ivy settings file:

<credentials host="${nexus.host}" realm="Sonatype Nexus Repository Manager" username="${nexus.user}" passwd="${nexus.pass}" />  

问题是您需要指定正确的 Nexus 安全领域.

The gotcha is you need to specify the correct Nexus security realm.

这篇关于使用ant/ivy从nexus检索依赖之间的http身份验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆