Maven Failed to transfer artifact, Not Allowed, ReasonPhrase: Unauthorized

I added the below dependencies in the pom.xml file:

 <dependency> <groupId>org.tuckey</groupId> <artifactId>urlrewritefilter</artifactId> <version>4.0.4</version> </dependency> 

I have many maven dependencies, but when I add one above, I get:

 Failed to read artifact descriptor for org.tuckey:urlrewritefilter:jar:4.0.4: Could not transfer artifact org.tuckey:urlrewritefilter:pom:4.0.4 from/to central (http://app1.stage.server.net/artifactory/libs-release): Not authorized, ReasonPhrase:Unauthorized. -> [Help 1] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException 

This is what the settings.xml file looks like:

 .. <servers> <server> <username>user</username> <id>central</id> <password>my-password</password> </server> <server> <username>user</username> <id>snapshots</id> <password>my-password</password> </server> </servers> <profiles> ... </profiles> <activeProfiles> <activeProfile>artifactory</activeProfile> </activeProfiles> .. 

any help? Hh

+8
java maven
source share
4 answers

I ran into this problem when my proxy configured maven incorrectly. You should check the proxy server with your network administrator and add it to settings.xml in conf conf.

You can search for the <proxies> and update the fields.

When I encounter this problem, I also felt that this happened in just a few jars, but then all the other necessary jar files were already present in my local repository, and therefore I only received it for a few jars.

+3
source share

I encountered an error while deploying to an internal Nexus instance with a Maven client that used a proxy without settings. Attempting to access a Nexus instance on the local network through a proxy server resulted in a Not authorized, ReasonPhrase:Unauthorized error.

<nonProxyHosts>internal.hostname</nonProxyHosts> fixed the problem.

+1
source share

Adding this in case it helps someone else. In my case, I was getting this error, and none of the solutions that I found helped. In the end, I needed to add the config option to settings.xml in order to set interactiveMode to false.

+1
source share

Check access to the repository or password specified in settings.xml

0
source share

All Articles