我试图在发布帖子中找到我的问题的解决方案,但我找不到任何东西(无论是在stackoverflow还是在google中)
我正在尝试使用IVY向Nexus发布一些工件,但我收到了凭据错误。
在我的ivysettings.xml中,我定义了凭证标记,但它工作不正常(我试图将具体用户放入并传递并且不起作用)。如果我将/ nexus放在主机值中,如下所示:
<ivysettings>
<settings defaultResolver="nexus"/>
<credentials host="${host}/nexus" realm="Nexus Repository Manager"
username="${user}" passwd="${pass}"/>
<property name="nexus-public" value="${nexus.url}/content/groups/public"/>
<property name="nexus-releases" value="${nexus.url}/content/repositories/releases"/>
<property name="nexus-snapshots" value="${nexus.url}/content/repositories/ricrepo/"/>
<property name="nexus-other" value="${nexus.url}/content/repositories/releases/"/>
<resolvers>
<ibiblio name="nexus" m2compatible="true" usepoms="false" root="${nexus-public}"/>
<ibiblio name="nexus-releases" m2compatible="true" root="${nexus-releases}"/>
<ibiblio name="nexus-other" m2compatible="true" root="${nexus-other}"/>
<ibiblio name="nexus-snapshots" m2compatible="true" root="${nexus-snapshots}" checkmodified="true"
changingPattern="*-SNAPSHOT"/>
</resolvers>
</ivysettings>
$ {host}它只是$ {nexus.url},没有https://前缀,最后没有/ nexus
错误是:
[ivy:publish] INFO: Authentication requested but doAuthentication is disabled
Access to URL MYURL was refused by the server
MYURL是我的存储库的完整URL(所以它很好地解析了这个名字......我认为)
如果我从主机值中删除de / nexus(ivysettings将如下)
<ivysettings>
<settings defaultResolver="nexus"/>
<credentials host="${host}" realm="Nexus Repository Manager"
username="${user}" passwd="${pass}"/>
<property name="nexus-public" value="${nexus.url}/content/groups/public"/>
<property name="nexus-releases" value="${nexus.url}/content/repositories/releases"/>
<property name="nexus-snapshots" value="${nexus.url}/content/repositories/ricrepo/"/>
<property name="nexus-other" value="${nexus.url}/content/repositories/releases/"/>
<resolvers>
<ibiblio name="nexus" m2compatible="true" usepoms="false" root="${nexus-public}"/>
<ibiblio name="nexus-releases" m2compatible="true" root="${nexus-releases}"/>
<ibiblio name="nexus-other" m2compatible="true" root="${nexus-other}"/>
<ibiblio name="nexus-snapshots" m2compatible="true" root="${nexus-snapshots}" checkmodified="true"
changingPattern="*-SNAPSHOT"/>
</resolvers>
</ivysettings>
错误是:
[ivy:publish] INFO: No credentials available for BASIC 'Sonatype Nexus Repository Manager'
Access to URL MYURL was refused by the server
拜托,有人可以帮助我吗?
提前致谢!
答案 0 :(得分:0)
尝试将领域设置为&#34; Sonatype Nexus Repository Manager&#34;:
<credentials host="${host}" realm="Sonatype Nexus Repository Manager" username="${user}" passwd="${pass}"/>