npm adduser
添加注册表用户账户
概要
npm adduser
aliases: login, add-user
注意:此命令对工作区无感知。
描述
在指定的注册表中创建或验证名为 <username>
的用户,并将凭据保存到 .npmrc
文件中。如果未指定注册表,将使用默认注册表(参见 config
)。
从提示中读入用户名、密码和电子邮件。
要重设密码,请转到 https://www.npmjs.com/forgot
qXS/XseuRM4vOwgahYAT9IBwgNxs7srMS5zGq66HqUcih29Bq7pUfgh+bcSTMLkKNjCQk+FNGhEClhzOq2MnA5MUYU1jpwAMAhlppWbdVzk3Ldl9BPXDQqcz3jsLHeC7AHhZnrIBaq40lnZRxMcMciYJUPMM5qb5TxxU4chew7Y=
mbhVoMvbidTUmV6QlFStDKYxGD1sH8Zb/SjF/OvwxBxRhrFnHbV2ZC35WfA4YXwptitEzpKOxA4H0BtSlf52xn8o/0JtlMpxnB5O/tY+cPwZfCJs0ky3TDmrlZaZQOzKnUjHDbCa+WdmD/XlyxmVn9JP3HddW+yRse5G72REjOMzssbv+tWq9D5bzzFDWqh+2UgqzescFuPR3Zy7a0aGM9Nc+EVXoMH1DhjQWLhQ/1GFgTbz0Cj6JzQCTkPy+0Z75fTO3FlrNEyeQbCFTsH0nw==
yN5r3+ezlGnRgCHizm7vIcv90B+bDWMuY4RsJ3ojMZH0wJmGOTaD6U7TBy6TaRJbn4QpQ5liw2wil1Gu4G00+tHAld9ufrw9E8GDqJLmVumS7PTtLkD/rUbkgPnfXLAL
配置
registry
- cpHcqTIrxEt4f28KOhZfPl/X+ePJtejtp8jxV/JVLOxge4tT8rAAL31mDPRyJ+e1C8nbpPC8x0mUo79XMtdYcS5JipQ8/7DOgV3VW4P81jVIkxDP24KzWJFGPO+vLGwYnL+0sIfHs82axbAf5c5yXN9jsG+U9U6/fdkeEeE91WE=
xBVm2vKMIrOuRn1Jtv7Ya8DXce131jalfnpN6ahNr6Q=
scope
- cpHcqTIrxEt4f28KOhZfPgK4D3wVgWDGgOy76jzguXhLoSUi9lNeU1VWWBQmCtKbHwDcv6WLEG4E/skUfFRNkvV1uAPTR/oMzK0/sNCSTNp5sgYCq8KPkzXHFSNvsBgRVtMT6b8ioypC2l48T7CBng==
/boaSgGpARgldH9NXE0KnBCMloGOMNeH9gan/+OZiWlz1fT+quHw9jLHJQ7KayoCbcZkeICGIjLM4MhXkTq33Q==
fUvaCcFPfEbdKOv5PHxz64Q6QYYBELrRAt9T9SmjSmAIDqKLMvBSwZoWNk8NlexZ1naPUlmnYQEl/V3mzAlu3w==
# log in, linking the scope to the custom registry
npm login --scope=@mycorp --registry=https://registry.mycorp.com
# log out, removing the link and the auth token
npm logout --scope=@mycorp
BpUCCyULLdOHKyFo+aNUUWReNaAGuH7oIhsN7fcLMkid0CRG379GEZso4C4VYN1+FGMcWP+VOTbW/QHYQevdC1RzjbIQCTcmNRQPe5BMTo9zeF7joLMtm641vV1D74mQWLIp/D9pNgiOya/CBpTHovWMXizmzW8c50UXRVarPX8ISd/C5KnIS5iKhdr5krTj
NZQEzc/aqrO3r3lEb+FYnWJk7uBdlZ2ijcFu6Npoa6UDcbNHt2jFpCTOrMI3nby9K5s37BBo3y5wluWIYc3DmQ==
# accept all defaults, and create a package named "@foo/whatever",
# instead of just named "whatever"
npm init --scope=@foo --yes
auth-type
- cpHcqTIrxEt4f28KOhZfPlXegzekNNmbgeZe01yqCZpDwPQZEjqiyne53yAdl5rpeYf5pvRW0HuS0tKrrWv7aM852LXQpJfFIBql6qwnFugNXbAvksYlAZNSlvG0k6PO7gAP5AjCm1KPxjNiTc/nGA==
zLkwouQ0I9XBt7s55OffC7Mff9Xuf7OyTertwiDa9V2DfzZs1sjYFE6CeEwg1mZoxwZc4FYvLoJjFuPLbFvOCuKfr4V+2DA3MPYbl3WJEwRaSzIgrwWSGDi8vHuL9zDV
XcgJBmKmOXirN+bRVg2pdwQ+9E9ctzuplS/8I2AZMEpHi6HxjAOxxjc6TLq+NnpbmbCOXUiI1rB14h8lAiu9AA==