Stack Exchange
Maven clean and install returns 401 on resolving some dependencies
I am trying to clean and install a Maven project. This is the first time I am doing anything like this and am running into a few issues that I don't know what to do about:
The stacktrace:
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact com.twmacinta:fast-md5:pom:2.7.1 from/to maven-twacinta (https://repo.spring.io/plugins-release/): Access denied to https://repo.spring.io/plugins-release/com/twmacinta/fast-md5/2.7.1/fast-md5-2.7.1.pom. Error code 401, 
    at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:889)
    at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:1)
    at io.takari.aether.connector.AetherRepositoryConnector$GetTask.flush(AetherRepositoryConnector.java:659)
    at io.takari.aether.connector.AetherRepositoryConnector.get(AetherRepositoryConnector.java:337)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:499)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:401)
    ... 44 more
Caused by: io.takari.aether.connector.AuthorizationException: Access denied to https://repo.spring.io/plugins-release/com/twmacinta/fast-md5/2.7.1/fast-md5-2.7.1.pom. Error code 401, 
    at io.takari.aether.connector.AetherRepositoryConnector.handleResponseCode(AetherRepositoryConnector.java:397)
    at io.takari.aether.connector.AetherRepositoryConnector.access$8(AetherRepositoryConnector.java:391)
    at io.takari.aether.connector.AetherRepositoryConnector$GetTask.resumableGet(AetherRepositoryConnector.java:603)
    at io.takari.aether.connector.AetherRepositoryConnector$GetTask.run(AetherRepositoryConnector.java:481)
    at io.takari.aether.connector.AetherRepositoryConnector$DirectExecutor.execute(AetherRepositoryConnector.java:915)
    at io.takari.aether.connector.AetherRepositoryConnector.get(AetherRepositoryConnector.java:331)  

Access is being denied to a specific dependency. When I go to the link, it asks me for a username and password. Link: [https://repo.spring.io/plugins-release/com/twmacinta/fast-md5/2.7.1/fast-md5-2.7.1.pom 1
I suspect that the username and password are either wrong or not being supplied at all. My questions:

Where are the username and password specified? Where can I find what username and password is being used here if at all.
Anyone know the username and password for this repo or a workaround?
Any other insights to solve this? This code works on someone's laptop that I am trying to take over. Trouble is, it works for them out of the box and they too dont know why!


Can you add the dependency you are using in the pom?

Manuel: The dependency is already there in the pom.xml:


com.twmacinta
fast-md5
2.7.1

i think it is missing a username and password?

The configurations for repositories (and their passwords) are usually in the settings.xml in the user directory under .m2.
You probably need to copy it from your colleague.

ok. thanks fabian. will try and post back here.

If you don't have the username/password, it is feasible to download the dependencies anonymously. Please refer to my answer in this thread:
https://stackoverflow.com/a/68645965/13050402
