作为组织所有者或软件包维护者,你可以添加或删除组织中团队的软件包访问权限。

🌐 As an organization owner or package maintainer, you can add or remove package access to or from teams in your organization.

添加包访问到团队

🌐 Adding package access to a team

在网站上添加包访问到团队

🌐 Adding package access to a team on the web

  1. 在 npm“登录”页面上,输入您的帐户详细信息并单击登录 Screenshot of npm login dialog
  2. 在页面的右上角,点击您的个人资料照片,然后点击帐户 Screenshot of account settings selection in user menu
  3. 在左侧边栏中,单击您的组织名称。 Screenshot of a selected organization
  4. 在组织设置页面上,单击团队 Screenshot of the organization teams tab
  5. 在你想要为其添加软件包访问权限的团队旁,点击 软件包

    Screenshot of the packages button
  6. 在“添加软件包”页面上的“软件包”字段中,输入软件包名称,然后从下拉菜单中选择。

    Screenshot of the package selection
  7. 点击 + 添加现有包

    Screenshot of the add package button
  8. 在软件包名称旁边,点击 只读读写 来设置该软件包的团队权限。

    Screenshot of the team package permission option

使用 CLI 添加包访问到团队

🌐 Adding package access to a team using the CLI

作为组织所有者或软件包维护者,你可以使用 CLI access 命令在命令行中为团队添加软件包访问权限:

🌐 As an organization owner or package maintainer, you can use the CLI access command to add package access to a team on the command line:

npm access grant <read-only|read-write> <org:team> [<package>]

有关更多信息,请参阅“npm访问”。

🌐 For more information, see "npm-access".

从团队中移除包访问权限

🌐 Removing package access from a team

从网站上从团队中移除包访问权限

🌐 Removing package access from a team on the web

  1. 在 npm“登录”页面上,输入您的帐户详细信息并单击登录 Screenshot of npm login dialog
  2. 在页面的右上角,点击您的个人资料照片,然后点击帐户 Screenshot of account settings selection in user menu
  3. 在左侧边栏中,单击您的组织名称。 Screenshot of a selected organization
  4. 在组织设置页面上,单击团队 Screenshot of the organization teams tab
  5. 在你想要移除软件包访问权限的团队旁,点击 Packages

    Screenshot of the packages button
  6. 在你想要移除访问权限的软件包名称旁,点击 x

    Screenshot of the remove package button

使用 CLI 从团队中移除包访问权限

🌐 Removing package access from a team using the CLI

作为组织所有者或包维护者,你还可以使用命令行工具 access 命令从命令行撤销团队对包的访问权限:

🌐 As an organization owner or package maintainer, you can also use the CLI access command to revoke package access from a team on the command line:

npm access revoke <org:team> [<package>]

有关更多信息,请参阅“npm访问”。

🌐 For more information, see "npm-access".

更改团队的包访问权限

🌐 Changing package access for a team

在网站上更改团队的包访问权限

🌐 Changing package access for a team on the web

  1. 在 npm“登录”页面上,输入您的帐户详细信息并单击登录 Screenshot of npm login dialog
  2. 在页面的右上角,点击您的个人资料照片,然后点击帐户 Screenshot of account settings selection in user menu
  3. 在左侧边栏中,单击您的组织名称。 Screenshot of a selected organization
  4. 在组织设置页面上,单击团队 Screenshot of the organization teams tab
  5. 在你想要移除软件包访问权限的团队旁,点击 Packages

    Screenshot of the packages button
  6. 在软件包名称旁边,点击 只读读写 来设置该软件包的团队权限。

    Screenshot of the change package permission option

从 CLI 更改团队的包访问权限

🌐 Changing package access for a team from the CLI

作为组织所有者或软件包维护者,你可以从命令行更改团队的软件包访问权限:

🌐 As an organization owner or package maintainer, you can change package access for a team from the command line:

npm access

有关更多信息,请参阅 npm-access CLI 文档

🌐 For more information, see the npm-access CLI documentation.