登录 company’s npm Enterprise registry 的步骤,取决于你是如何 配置你的npm register 设置的

  • 将公司的 npm Enterprise register 作为自己登录时默认的 register
  • 使用 npmrc 登录
  • 使用设置 scope 来指向 npm Enterprise register的方式登录

将公司的 npm Enterprise register 作为自己登录时默认的 register

  1. 在命令行中,输入如下命令

    1. npm login
  2. 当出现提示,提供你的 SSO 凭证(credentials)

使用 npmrc 登录

  1. 在命令行中,选择你的 npm Enterprise 配置文件:

    1. npmrc work
  2. 运行下面的命令:

    1. npm login
  3. 当出现提示,提供你的 SSO 凭证(credentials)

使用设置 scope 来指向 npm Enterprise register的方式登录

  1. 在命令行中,输入下面的命令

    1. npm login --registry=https://registry.company-name.npme.io
  2. 当出现提示,提供你的 SSO 凭证(credentials)