-
Notifications
You must be signed in to change notification settings - Fork 37
Publishing to sonatype fails with 401 #356
Copy link
Copy link
Open
Description
I made sure to create a token and stored the credentials in my properties file, and I am sure they are set as username/password.
I configured the nexusPlugin as described in the readme:
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username = if (project.hasProperty("mavenCentralUser")) {
project.properties["mavenCentralUser"] as? String
} else {
System.getenv("MAVEN_CENTRAL_USER")
} ?: error("No maven user found")
password = if (project.hasProperty("mavenCentralToken")) {
project.properties["mavenCentralToken"] as? String
} else {
System.getenv("MAVEN_CENTRAL_TOKEN")
} ?: error("No maven token found")
}
}
}
but I still get
> Task :initializeSonatypeStagingRepository FAILED
Caching disabled for task ':initializeSonatypeStagingRepository' because:
Caching has not been enabled for the task
Task ':initializeSonatypeStagingRepository' is not up-to-date because:
Task has not declared any outputs despite executing actions.
No stagingProfileId set, querying for packageGroup 'com.martmists.ndarray-simd'
49 actionable tasks: 4 executed, 45 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':initializeSonatypeStagingRepository'.
> Failed to load staging profiles, server at https://s01.oss.sonatype.org/service/local/ responded with status code 401, body:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels