Saturday, July 21, 2018

Maven error - Credentials cannot be used for NTLM authentication

I've been using CNTLM to access the resources on the internet through corporate proxy. Recently, I started getting the following error messages from maven.
  • WARNING: NEGOTIATE authentication error: No valid credentials provided (Mechanism level: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt))
  • WARNING: NTLM authentication error: Credentials cannot be used for NTLM authentication: org.apache.maven.wagon.providers.http.httpclient.auth.UsernamePasswordCredentials
After some investigation, I found out that wagon-http-lightweight artifact has to be overridden in maven configuration. I was able to do this by placing wagon-http-lightweight-2.2.jar file into $M2_HOME\lib\ext folder I'm using maven version number 3.5.2. I haven't checked it with other versions. This artifact can be downloaded from here

1 comment:

Anonymous said...

Great move, thanks for the tip