From 4b1a85f04ff87a3f8156e4cb3fcb31df92575969 Mon Sep 17 00:00:00 2001 From: XuqmGroup Date: Sat, 16 May 2026 12:18:54 +0800 Subject: [PATCH] fix: use string concat for npm auth to avoid Jenkins sandbox GString.getBytes restriction --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6a85e5f..1b71bf3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -68,7 +68,7 @@ pipeline { steps { withCredentials([usernamePassword(credentialsId: 'NEXUS_CREDS', passwordVariable: 'NPM_PASS', usernameVariable: 'NPM_USER')]) { script { - def auth = "${NPM_USER}:${NPM_PASS}".bytes.encodeBase64().toString() + def auth = (NPM_USER + ':' + NPM_PASS).bytes.encodeBase64().toString() writeFile file: '.npmrc', text: "//nexus.xuqinmin.com/repository/npm-hosted/:_auth=${auth}\n" bat "npm publish --registry %NEXUS_REGISTRY%" }