将协作者添加到用户账户拥有的私有包中

作为具有付费用户账户的 npm 用户,你可以添加另一个具有付费账户的 npm 用户作为你拥有的私有包的协作者。

As an npm user with a paid user account, you can add another npm user with a paid account as a collaborator on a private package you own.

注意:你要添加为私有包的协作者的用户必须具有付费用户账户。要注册付费账户,他们可以访问 https://www.npmjs.com/settings/username/billing,将 username 替换为他们的 npm 用户名。

Note: The user you want to add as a collaborator on your private package must have a paid user account. To sign up for a paid account, they can visit https://www.npmjs.com/settings/username/billing, replacing username with their npm username.

当你将成员添加到你的包时,他们会收到一封电子邮件,邀请他们加入包。新成员必须接受邀请才能访问包。

When you add a member to your package, they are sent an email inviting them to the package. The new member has to accept the invitation to gain access to the package.

在网站上授予对私有用户包的访问权限

Granting access to a private user package on the web

  1. npm 网站 上,转到要添加协作者的包:https://www.npmjs.com/package/<your-package-name>

    On the npm website, go to the package to which you want to add a collaborator: https://www.npmjs.com/package/<your-package-name>

  2. 在包页面的 "合作者" 下,单击 +。

    On the package page, under "Collaborators", click +.

  3. 输入协作者的 npm 用户名。

    Enter the npm username of the collaborator.

  4. 单击提交。

    Click Submit.

从命令行接口授予私有包的访问权限

Granting private package access from the command line interface

要在命令行上将协作者添加到包中,请运行以下命令,将 <user> 替换为协作者的 npm 用户名,将 <your-package-name> 替换为私有包的名称:

To add a collaborator to a package on the command line, run the following command, replacing <user> with the npm username of your collaborator, and <your-package-name> with the name of the private package:

npm owner add <user> <your-package-name>

授予对私有组织包的访问权限

Granting access to private organization packages

要授予 npm 用户对私有组织包的访问权限,你必须让组织所有者将它们添加到你的组织中,然后将它们添加到有权访问私有包的团队中。欲了解更多信息,请参阅“添加成员到你的组织”。

To grant an npm user access to private organization packages, you must have an organization owner add them to your organization, then add them to a team that has access to the private package. For more information, see "Adding members to your organization".

npm 中文网 - 粤ICP备13048890号