NPM registry publish fails after update to 13.7.0 (and 13.7.1)
Summary
After updating Gitlab to 13.7.0, CI pipelines that publish javascript packages to our Gitlab instance project regitry fails with Not auth.
Updating to 13.7.1 did not fix.
Latest build and push to registry dates back about a week.
Steps to reproduce
Following publish.sh is ran through CI
echo "Publishing $PACKAGE"
cd ${CI_PROJECT_DIR}/packages/xxxxxjs/${PACKAGE}
npm --userconfig ${CI_PROJECT_DIR}/packages/xxxxxjs/.npmrc publish
/packages/xxxxxjs/.npmrc
:
@xxxxx:registry=https://code.xxxxx.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm
//code.xxxxx.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}
What is the current bug behavior?
CI jobs fails with:
Publishing xxxxxjs
npm ERR! code ENEEDAUTH
npm ERR! need auth This command requires you to be logged in.
npm ERR! need auth You need to authorize this machine using `npm adduser`
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-12-24T10_11_25_244Z-debug.log
Here is the content of /root/.npm/_logs/2020-12-24T10_11_25_244Z-debug.log, does not says much more:
verbose cli [
0 verbose cli '/usr/local/bin/node',
0 verbose cli '/usr/local/bin/npm',
0 verbose cli '--userconfig',
0 verbose cli '/builds/xxxxx/xxxxx/packages/xxxxxjs/.npmrc',
0 verbose cli 'publish'
0 verbose cli ]
1 info using npm@7.3.0
2 info using node@v15.5.0
3 timing config:load:defaults Completed in 2ms
4 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 0ms
5 timing config:load:builtin Completed in 2ms
6 timing config:load:cli Completed in 7ms
7 timing config:load:env Completed in 1ms
8 timing config:load:file:/builds/xxxxx/xxxxx/packages/xxxxxjs/strings/.npmrc Completed in 0ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:/builds/xxxxx/xxxxx/packages/xxxxxjs/.npmrc Completed in 7ms
11 timing config:load:user Completed in 7ms
12 timing config:load:file:/usr/local/etc/npmrc Completed in 1ms
13 timing config:load:global Completed in 1ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 1ms
17 timing config:load:setEnvs Completed in 6ms
18 timing config:load Completed in 28ms
19 verbose npm-session 892a17d2c30e16e8
20 timing npm:load Completed in 50ms
21 verbose publish [ '.' ]
22 timing command:publish Completed in 3ms
23 verbose stack Error: This command requires you to be logged in.
23 verbose stack at publish (/usr/local/lib/node_modules/npm/lib/publish.js:48:25)
23 verbose stack at cmd (/usr/local/lib/node_modules/npm/lib/publish.js:27:27)
23 verbose stack at Object.[_runCmd] (/usr/local/lib/node_modules/npm/lib/npm.js:119:7)
23 verbose stack at fn (/usr/local/lib/node_modules/npm/lib/npm.js:46:40)
23 verbose stack at Object.<anonymous> (/usr/local/lib/node_modules/npm/lib/cli.js:58:7)
24 verbose cwd /builds/xxxxx/xxxxx/packages/xxxxxjs/strings
25 verbose Linux 4.9.0-14-amd64
26 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "--userconfig" "/builds/xxxxx/xxxxx/packages/xxxxxjs/.npmrc" "publish"
27 verbose node v15.5.0
28 verbose npm v7.3.0
29 error code ENEEDAUTH
30 error need auth This command requires you to be logged in.
31 error need auth You need to authorize this machine using `npm adduser`
32 verbose exit 1
What is the expected correct behavior?
Until updating to 13.7, package was published to the registry.
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Debian 9.13 Current User: git Using RVM: no Ruby Version: 2.7.2p137 Gem Version: 3.1.4 Bundler Version:2.1.4 Rake Version: 13.0.1 Redis Version: 5.0.9 Git Version: 2.29.0 Sidekiq Version:5.2.9 Go Version: unknown GitLab information Version: 13.7.1 Revision: c97c8073a0e Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 11.9 URL: https://code.xxxxx.com HTTP Clone URL: https://code.xxxxx.com/some-group/some-project.git SSH Clone URL: git@code.xxxxx.com:some-group/some-project.git Using LDAP: no Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 13.14.0 Repository storage paths: - default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 13.14.0 ? ... OK (13.14.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 2/3 ... yes 2/4 ... yes 2/5 ... yes 2/6 ... yes 2/7 ... yes 9/8 ... yes 2/9 ... yes 2/10 ... yes 2/11 ... yes 2/12 ... yes 2/13 ... yes 2/14 ... yes 2/15 ... yes 2/16 ... yes 2/17 ... yes 2/18 ... yes 2/19 ... yes 2/20 ... yes 2/21 ... yes 2/22 ... yes 2/23 ... yes 2/24 ... yes 2/25 ... yes 2/26 ... yes 2/27 ... yes 2/28 ... yes 2/29 ... yes 2/30 ... yes 2/31 ... yes 2/32 ... yes 2/33 ... yes 2/34 ... yes 2/35 ... yes 2/36 ... yes 2/37 ... yes 2/38 ... yes 2/40 ... yes 2/41 ... yes 2/42 ... yes 2/43 ... yes 2/44 ... yes 2/46 ... yes 7/47 ... yes 2/48 ... yes 2/49 ... yes 14/50 ... yes 2/51 ... yes 2/52 ... yes 2/53 ... yes 2/54 ... yes 9/56 ... yes 2/57 ... yes 10/58 ... yes 10/59 ... yes 3/60 ... yes 11/61 ... yes 2/62 ... yes 10/63 ... yes 10/65 ... yes 10/66 ... yes 2/68 ... yes 13/69 ... yes 13/70 ... yes 13/72 ... yes 13/73 ... yes 13/74 ... yes 13/75 ... yes 13/76 ... yes 2/77 ... yes 14/78 ... yes 14/79 ... yes 2/80 ... yes 15/81 ... yes 15/82 ... yes 9/84 ... yes 15/85 ... yes 15/87 ... yes 9/88 ... yes 13/89 ... yes 9/91 ... yes Redis version >= 4.0.0? ... yes Ruby version >= 2.7.2 ? ... yes (2.7.2) Git version >= 2.29.0 ? ... yes (2.29.0) Git user has default SSH configuration? ... yes Active users: ... 63 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished