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

Fallback to find credential with a null/blank realm #36

Merged
merged 4 commits into from
Feb 22, 2020
Merged

Fallback to find credential with a null/blank realm #36

merged 4 commits into from
Feb 22, 2020

Conversation

eed3si9n
Copy link
Member

Ref sbt/sbt#2366

Some repositories like Azure DevOps supposedly changes the realm. If credentials are not found for a particular host + realm combo, it will now fallback to using just host, which is expressed by using null or "" realm.

Ref sbt/sbt#2366

Some repositories like Azure DevOps supposedly changes the realm. If credentials are not found for a particular host + realm combo, it will now fallback to using just host, which is expressed by using null or "" realm.
@eed3si9n eed3si9n merged commit fa72685 into sbt:2.3.x-sbt Feb 22, 2020
@eed3si9n eed3si9n deleted the wip/credential_fallback branch February 22, 2020 11:09
3rwww1 added a commit to 3rwww1/sbt that referenced this pull request May 3, 2020
As stated in sbt#5492 and sbt#2366 some artifact hosting services (at least
Azure Artifacts, seems to affect GCP as well) do not offer a stable HTTP
Auth realm that can be safely set in SBT credentials, hence the need to
support null or empty Credentials.

The Ivy (publishing) side of the issue was fixed in sbt/ivy#36

As to the resolving side, This commit is only part of the solution as it
just prevents an NPE and does not consider if coursier itself will fall
back to finding credentials with a null realm that matches the server
hostname.

Related-to: sbt#5492
Related-to: sbt#2366
Signed-off-by: Erwan Queffelec <erwan.queffelec@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant