Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot access repo.spring.io - Getting unauthorized

Tags:

spring-io

I'm working on a gradle based spring boot project which downloads some dependencies from 'repo.spring.io'. The application used to work fine a while back but now I'm seeing an error in the download dependencies stage.

When the application goes on to download https://repo.spring.io/libs-milestone/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar, I receive an error with HTTP response code 401(Unauthorized).

I'm not sure if there has been some recent change at repo.spring.io end as this used to work on my application before without any issues.

This is the exact error that I get for reference --

What went wrong:
19:44:19 A problem occurred configuring project ':account_settings-service'.
19:44:19 > Could not resolve all files for configuration ':account_settings-service:classpath'.
19:44:19    > Could not download commons-logging.jar (commons-logging:commons-logging:1.1.3)
19:44:19       > Could not get resource 'https://repo.spring.io/libs-milestone/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar'.
19:44:19          > Could not HEAD 'https://repo.spring.io/libs-milestone/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar'. Received status code 401 from server: Unauthorized 

Kindly help if anyone has any idea about this or has observed a similar issue.

Thanks in Advance!

like image 441
Nachiket Juneja Avatar asked Nov 23 '20 07:11

Nachiket Juneja


1 Answers

As per this answer to this question, the Spring team are putting the kibbosh on freeloaders using their repository as a public distribution channel.

It looks like you'll need to adjust your {build thingy} so that it does not attempt to download from https://repo.spring.io/libs-milestone/

In the case of commons-logging:commons-logging:1.1.3 being an Apache project, 'Maven Central' (aka https://repo.maven.apache.org/maven2/, being an Apache repository) hosts https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.1.3/ without restrictions.

like image 164
David Bullock Avatar answered Dec 01 '22 01:12

David Bullock