Skip to content

[CELEBORN-1405][BUILD] SBT allows using credential without a realm#2484

Closed
pan3793 wants to merge 1 commit intoapache:mainfrom
pan3793:CELEBORN-1405
Closed

[CELEBORN-1405][BUILD] SBT allows using credential without a realm#2484
pan3793 wants to merge 1 commit intoapache:mainfrom
pan3793:CELEBORN-1405

Conversation

@pan3793
Copy link
Member

@pan3793 pan3793 commented Apr 30, 2024

What changes were proposed in this pull request?

Change SBT publish credential's realm from hardcoded "Sonatype Nexus Repository Manager" to "".

Why are the changes needed?

According to SBT docs:

Credentials matching is done using both: realm and host keys.

sbt/sbt#2366 allows using credential without a realm by providing an empty string for realm, that's what we wanted exactly.

Does this PR introduce any user-facing change?

Yes, before this change, when I tried to publish the artifacts to a private corp nexus, it failed with 401 even with corrected ASF_USERNAME and ASF_PASSWORD. The publication works well after this change.

How was this patch tested?

Manually tests.

SteNicholas pushed a commit that referenced this pull request May 5, 2024
### What changes were proposed in this pull request?

Change SBT publish credential's realm from hardcoded "Sonatype Nexus Repository Manager" to "".

### Why are the changes needed?

According to [SBT docs](https://www.scala-sbt.org/1.x/docs/Publishing.html#Credentials):

> Credentials matching is done using both: `realm` and `host` keys.

sbt/sbt#2366 allows using credential without a realm by providing an empty string for realm, that's what we wanted exactly.

### Does this PR introduce _any_ user-facing change?

Yes, before this change, when I tried to publish the artifacts to a private corp nexus, it failed with 401 even with corrected `ASF_USERNAME` and `ASF_PASSWORD`. The publication works well after this change.

### How was this patch tested?

Manually tests.

Closes #2484 from pan3793/CELEBORN-1405.

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: SteNicholas <programgeek@163.com>
(cherry picked from commit 8548e50)
Signed-off-by: SteNicholas <programgeek@163.com>
cfmcgrady pushed a commit to cfmcgrady/incubator-celeborn that referenced this pull request Aug 21, 2025
### What changes were proposed in this pull request?

Change SBT publish credential's realm from hardcoded "Sonatype Nexus Repository Manager" to "".

### Why are the changes needed?

According to [SBT docs](https://www.scala-sbt.org/1.x/docs/Publishing.html#Credentials):

> Credentials matching is done using both: `realm` and `host` keys.

sbt/sbt#2366 allows using credential without a realm by providing an empty string for realm, that's what we wanted exactly.

### Does this PR introduce _any_ user-facing change?

Yes, before this change, when I tried to publish the artifacts to a private corp nexus, it failed with 401 even with corrected `ASF_USERNAME` and `ASF_PASSWORD`. The publication works well after this change.

### How was this patch tested?

Manually tests.

Closes apache#2484 from pan3793/CELEBORN-1405.

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: SteNicholas <programgeek@163.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.

4 participants