-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
E401 error on npm publish to Verdaccio in container #3699
Comments
what is on the docker-compose.yml would be helpful |
@juanpicado as in the upper part of the screenshot shown docker-compose.yml version: '3.1'
services:
verdaccio:
image: verdaccio/verdaccio
container_name: 'verdaccio'
restart: always
user: 1000:1000
networks:
- node-network
environment:
- VERDACCIO_PORT=4873
ports:
- '4873:4873'
volumes:
- './storage:/verdaccio/storage'
- './config:/verdaccio/config'
- './plugins:/verdaccio/plugins'
networks:
node-network:
driver: bridge @Medvind2140 as I was facing the issue, I solved it by logging in with the scope parameter and adding the registry to the package.json (since it should only be exposed to verdaccio in my case), so I could simply run |
@johanneslosch @juanpicado Thanks for the reply. Yes I have added the registry to package.json. I cleaned up the .npmrc default files as some authTokens seemed to conflict. So I got past the authentication error, however the package is still not accepted. If its working in your end, It might be my environment, however I though it was strange it worked on an older version. These are the logs from both the client console and the verdaccio container: f@LP5:~/d/t/npm/registry-verdaccio$ npm publish
npm notice
npm notice 📦 @med42/[email protected]
npm notice === Tarball Contents ===
npm notice 18B README.md
npm notice 321B package.json
npm notice === Tarball Details ===
npm notice name: @med42/registry-verdaccio
npm notice version: 0.0.6
npm notice filename: med42-registry-verdaccio-0.0.6.tgz
npm notice package size: 350 B
npm notice unpacked size: 339 B
npm notice shasum: b75f2a9956f86780486708a8a86bae2283e9c0f3
npm notice integrity: sha512-sr/M6EKn3yBkB[...]e9NjgtKriHC7A==
npm notice total files: 2
npm notice
npm notice Publishing to http://12.23.98.244:4873 with tag latest and default access
npm ERR! code E404
npm ERR! 404 Not Found - PUT http://12.23.98.244:4873/@med42%2fregistry-verdaccio - no such package available
npm ERR! 404
npm ERR! 404 '@med42/[email protected]' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/f/.npm/_logs/2023-03-31T10_48_07_149Z-debug-0.log Container log: info --- auth/allow_action: access granted to: undefined
info --- med43 is allowed publish for @med42/registry-verdaccio
http <-- 200, user: med43(12.23.98.238), req: 'PUT /@med42%2fregistry-verdaccio', bytes: 1519/0
info --- making request: 'GET https://registry.npmjs.org/@med42%2Fregistry-verdaccio'
NotFoundError: no such package available
at getError (/usr/local/lib/node_modules/verdaccio/node_modules/@verdaccio/core/build/error-utils.js:71:45)
at Object.getNotFound (/usr/local/lib/node_modules/verdaccio/node_modules/@verdaccio/core/build/error-utils.js:97:10)
at /usr/local/lib/node_modules/verdaccio/build/lib/local-storage.js:582:45
at /usr/local/lib/node_modules/verdaccio/node_modules/@verdaccio/local-storage/lib/local-fs.js:190:14
http --- 404, req: 'GET https://registry.npmjs.org/@med42%2Fregistry-verdaccio' (streaming)
http --- 404, req: 'GET https://registry.npmjs.org/@med42%2Fregistry-verdaccio', bytes: 0/21
http <-- 404, user: med43(12.23.98.238), req: 'PUT /@med42%2fregistry-verdaccio', error: no such package available
|
+1 |
Looks like If you use the wrong password to log in, this error will appear, so maybe we should check if the account exist then if the password is correct? Solved!
|
I had this problem locally. Tried a lot of things. The solution for me was the length of the username / password. Before I used a short user/pass and now a longer and it works. Not sure why it works, maybe some encryption algorithm constraint. |
ENVIRONMENT
verdaccio version: 5.22.1
node version: 19.8.1
package manager: npm 9.5.1
Container installed on Raspberry PI with Docker-compose
BUG
Get an E401 error when trying to: npm publish --registry hostname:port
See image.
I then tried to do the same on an older Verdaccio version 4.8.1, and there was no problem.
So the problems seems to be with the latest version. It looks like the "/" character is converted to %2f in the PUT request that is initiated with npm publish. Is anyone else having this problem?
On server(Pi):
On client(Linux)
Expected behavior
The text was updated successfully, but these errors were encountered: