作为组织所有者或团队管理员,你可以向组织中的团队添加或删除包访问权限。

¥As an organization owner or team admin, 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. 在要添加包访问权限的团队旁边,单击包。

    ¥Beside the team to which you want to add package access, click Packages.

    Screenshot of the packages button
  6. 在 "添加包" 页面的 "包" 字段中,键入包的名称并从下拉菜单中选择。

    ¥On the "Add Packages" page, in the "Package" field, type the name of the package and select from the dropdown menu.

    Screenshot of the package selection
  7. 单击“+ 添加现有包”。

    ¥Click + Add Existing Package.

    Screenshot of the add package button
  8. 在包名称旁边,单击“读取”或“读/写”以设置包的团队权限。

    ¥Beside the package name, click read or read/write to set the team permissions for the package.

    Screenshot of the team package permission option

使用 CLI 添加包访问到团队

¥Adding package access to a team using the CLI

作为组织所有者或团队管理员,你可以使用 CLI access 命令在命令行上为团队添加包访问权限:

¥As an organization owner or team admin, 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-access”。

¥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. 在要删除程序包访问权限的团队旁边,单击程序包。

    ¥Beside the team from which you want to remove package access, click Packages.

    Screenshot of the packages button
  6. 在要删除访问权限的包的名称旁边,单击 x。

    ¥Beside the name of the package from which you want to remove access, click x.

    Screenshot of the remove package button

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

¥Removing package access from a team using the CLI

作为组织所有者或团队管理员,你还可以在命令行上使用 CLI access 命令撤销团队的包访问权限:

¥As an organization owner or team admin, 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-access”。

¥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. 在要删除程序包访问权限的团队旁边,单击程序包。

    ¥Beside the team from which you want to remove package access, click Packages.

    Screenshot of the packages button
  6. 在包名称旁边,单击“读取”或“读/写”以设置包的团队权限。

    ¥Beside the package name, click read or read/write to set the team permissions for the package.

    Screenshot of the change package permission option

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

¥Changing package access for a team from the CLI

作为组织所有者或团队管理员,你可以从命令行更改团队的包访问权限:

¥As an organization owner or team admin, 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.

npm 中文网 - 粤ICP备13048890号