在命令行上将包从用户账户转移到另一个用户账户
要使用 CLI 将包转移给另一个 npm 用户,请运行 npm owner add
命令,将 <their-username>
替换为其他用户的 npm 用户名。向其他用户发送电子邮件邀请。用户接受邀请后,运行 npm owner rm
命令,将 <your-username>
替换为您的 npm 用户名:
To transfer a package to another npm user using the CLI, run the npm owner add
command replacing <their-username>
with the other user's npm username. An email invitation is sent to the other user. After the user has accepted the invitation, run the npm owner rm
command replacing <your-username>
with your npm username:
npm owner add <their-username> <package-name>
# new maintainer accepts invitation
npm owner rm <your-username> <package-name>
GuB1rVxpughLgxVEyJ24RRAAobQbepcn5JlHystJKwdBWc93iwaTQd7kZ8S3wXGifOpTaxF+d17X+3jnHrdBwSUvwAvWs2nG+0p1NOrazQPgcEcTz8SV7FzL5aOYiOkQelbkoqXYPADRt5gYbDYoWamVxw6Rk0EEKAj7nCYx+Aj9z2/v1a/WiQ7iCoBHc6hP5y1zzTxnPab26t4SmCF56RJ4b4jE3OpNtMQvlX9RIOqZhwGhiYIY5W2f/0GDesNNJLdh3xaAeR2//Q5ZTkWjAeCXLiUDDzpdJkCGJ3Zoi17Xm+cVlOvWSKIGtWGegoc3OQlnmm0FidN1V4hE+UAM8Ly2XCeMyjqNLj/fvUN6zI5WH0zqDx0LsEPO4H+hQHhSUwZrNyd3Y8ie34XtxK0xpIdubRF4blmuY9g5CJheML2jQ4PyfTmtP4KJhJq1XP7XCO6gZVJGtXd3DW7qx51tZI/+vaJJCeZ11clPmPHvgc1Bt6REwlJppYx3R8EHFwKUvY1edCTK6GpUCYdxU5jRPA==
npm owner add <their-username> <package-name> --otp=123456
# new maintainer accepts invitation
npm owner rm <your-username> <package-name> --otp=123456