我是一个自动生成的代理.
我已经将settings.xml配置为使用此代理,但它仍然无效.Android SDK与我设置的相同代理工作正常.
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<proxies>
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username></username>
<password></password>
<host>MY-PROXY-HOST-HERE</host>
<port>8080</port>
<nonProxyHosts></nonProxyHosts>
</proxy>
</proxies>
</settings>
Run Code Online (Sandbox Code Playgroud)
我还能做些什么让maven工作?
错误:
WARNING: NTLM authentication error: Credentials cannot be used for NTLM authenti
cation: org.apache.maven.wagon.providers.http.httpclient.auth.UsernamePasswordCr
edentials
Run Code Online (Sandbox Code Playgroud)
如何获得我的NTLM身份验证信令?
Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): Not authorized by proxy , ReasonPhrase:Proxy Authorization Required.
Run Code Online (Sandbox Code Playgroud)
这是输出消息.在我的wpad.dat(我从那里获取代理数据),我没有指定的用户名和密码...
pos*_*rux 19
凭证不是解决方案!
解决您的问题的方法是cntlm
要走的路
第一步 - >
永久摆脱这些NTLM代理问题的步骤.
http_proxy使用值" http://localhost:3128"和https_proxy值" http://localhost:3128" 命名两个环境变量.而已!!现在你永远不会看到与NTLM代理身份验证相关的错误失败或其他任何事情甚至不在sbt或maven!CNTLM非常快,因为它是用C开发的!
第二步 - >
启动cntlm身份验证代理服务器
确保您的settings.xml文件的代理看起来像这样.
<proxies>
<!-- proxy
| Specification for one proxy, to be used in connecting to the network.
|-->
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>127.0.0.1</host>
<port>3128</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
</proxies>
Run Code Online (Sandbox Code Playgroud)
如果某些东西不起作用,请给我反馈意见!