Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repository configuration option to not make repeated requests to a repository after recieving a 401 during dependency resolution #11939

Open
Archthebald opened this issue Jan 18, 2020 · 1 comment
Labels
a:feature A new functionality in:dependency-resolution engine metadata in:repository-declarations declaring repositories and filtering

Comments

@Archthebald
Copy link

Expected Behavior

If a remote repository returns a 401 (not authorized) when requesting a dependency, we should not try to resolve any further dependencies from that repository for the duration of the current build. This would allow the user to mitigate an incorrect password without potentially locking their account.

Current Behavior

We continue to try to retrieve dependencies from a remote repository despite previous HTTP return codes.

Context

We are using a Maven2 repository that requires basic auth. If the password is incorrect we and there are multiple dependencies,the repository receives multiple invalid access attempts from the provided username and responds by locking the account mid build before the user can mitigate the error. This situation is common enough with the password update requirements on the accounts.

An alternative would be better authentication methods to the repository, but in the environment I work in this is not possible.

@oehme
Copy link
Contributor

oehme commented Nov 15, 2020

We did that in Gradle 4.3 and it let to many complaints, see #3335

Short version: There are many repositories, which are partially public. I.e. they return 200 for some dependencies and 401 for others. If we blacklisted such a repository on the first 401, then we would fail to find things that would actually return 200.

@jjohannes jjohannes removed the @jvm label Mar 22, 2021
@donat donat changed the title Repository configuration option to not make repeted requests to a repository after recieving a 401 during dependency resolution Repository configuration option to not make repeated requests to a repository after recieving a 401 during dependency resolution Nov 9, 2021
@octylFractal octylFractal added in:dependency-resolution engine metadata in:repository-declarations declaring repositories and filtering and removed in:dependency-management DO NOT USE labels Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:feature A new functionality in:dependency-resolution engine metadata in:repository-declarations declaring repositories and filtering
Projects
None yet
Development

No branches or pull requests

5 participants