Skip to content
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

Cannot be installed anonymously #4

Open
tvainika opened this issue Sep 22, 2019 · 3 comments
Open

Cannot be installed anonymously #4

tvainika opened this issue Sep 22, 2019 · 3 comments

Comments

@tvainika
Copy link

Is this intentional feature that the package cannot be installed with npm without registering to GitHub and logging in?

Executed in clean container:

node@fcf90001f37f:~$ cat ~/.npmrc 
@codertocat:registry=https://npm.pkg.github.com

and

node@fcf90001f37f:~$ npm install @codertocat/[email protected]
npm ERR! code E401
npm ERR! Unable to authenticate, need: Basic realm="GitHub Package Registry"

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/node/.npm/_logs/2019-09-22T20_07_31_130Z-debug.log
@ilg-ul
Copy link

ilg-ul commented Oct 30, 2019

It looks like Microsoft completely botched this; I understand that publishing requires a valid login to the server, but it is not normal to require the same credentials to consume packages, this should work anonymously, as the npmjs.com server does.

I wonder how does Microsoft expect CI/CD environments to consume such packages?

Anyone managed to make such thing work?

@elpoll
Copy link

elpoll commented Mar 15, 2022

So what if i change my mind?

@ilg-ul
Copy link

ilg-ul commented Mar 15, 2022

I did another test today and the only difference was the error message:

root@90bc5e508d0c:~# npm --version
8.5.4
root@90bc5e508d0c:~# cat ~/.npmrc
@codertocat:registry=https://npm.pkg.github.com
root@90bc5e508d0c:~# npm install @codertocat/[email protected]
npm ERR! code E401
npm ERR! Incorrect or missing password.
npm ERR! If you were trying to login, change your password, create an
npm ERR! authentication token or enable two-factor authentication then
npm ERR! that means you likely typed your password in incorrectly.
npm ERR! Please try again, or recover your password at:
npm ERR!     https://www.npmjs.com/forgot
npm ERR! 
npm ERR! If you were doing some other operation then your saved credentials are
npm ERR! probably out of date. To correct this please try logging in again with:
npm ERR!     npm login

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-03-15T06_58_07_068Z-debug-0.log
root@90bc5e508d0c:~# 

So publishing the packages at GitHub is still not practical, and Microsoft does not seem to be interested in changing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@ilg-ul @tvainika @elpoll and others