Skip to content

Commit eaf2bd8

Browse files
committed
Rename Central Portal deployment env vars
OK, now I'm renaming the credentials, because my first release failed: Error: [ERROR] Unable to upload bundle for deployment: Deployment [INFO] java.lang.RuntimeException: Invalid request. Status: 401 Response body: [INFO] at org.sonatype.central.publisher.client.httpclient.UploadPublisherEndpoint.call (UploadPublisherEndpoint.java:33) I am not actually certain the user token changed (it may just be that the legacy `OSSRH_USER=scijava-ci` value was the culprit), but that's OK: going through the few orgs that actually deploy to Maven Central to update to a new token is not really such a big hassle.
1 parent e6ecc16 commit eaf2bd8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ci-build.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ if [ -f pom.xml ]; then
7575
mkdir -p "$HOME/.m2"
7676
settingsFile="$HOME/.m2/settings.xml"
7777
customSettings=.ci/settings.xml
78-
if [ -z "$MAVEN_PASS" -a -z "$OSSRH_PASS" ]; then
78+
if [ "$OSSRH_USER" -o "$OSSRH_PASS" ]; then
79+
echo "[WARNING] Obsolete OSSRH vars detected. Secrets may need updating to deploy to Maven Central."
80+
fi
81+
if [ -z "$MAVEN_PASS" -a -z "$CENTRAL_PASS" ]; then
7982
echo "[WARNING] Skipping settings.xml generation (no deployment credentials)."
8083
elif [ -f "$customSettings" ]; then
8184
cp "$customSettings" "$settingsFile"
8285
else
83-
if [ -z "$OSSRH_USER" ]; then
84-
OSSRH_USER=scijava-ci
85-
fi
8686
cat >"$settingsFile" <<EOL
8787
<settings>
8888
<servers>
@@ -98,8 +98,8 @@ if [ -f pom.xml ]; then
9898
</server>
9999
<server>
100100
<id>central</id>
101-
<username>$OSSRH_USER</username>
102-
<password>$(escapeXML "$OSSRH_PASS")</password>
101+
<username>$CENTRAL_USER</username>
102+
<password>$(escapeXML "$CENTRAL_PASS")</password>
103103
</server>
104104
</servers>
105105
<profiles>

0 commit comments

Comments
 (0)