更新时间:2023-08-26 10:49:58
更新2021年12月
移至仅支持apiKey。如果您的old_auth是username:password
或username:encrypted_password
的Base64编码,那么现在两者都是不可接受的。您必须使用apiKey来代替它们。
因此,SUPPORTED_AUTH现在变为:
_auth:apiKey
但具有讽刺意味的是,即使这样在某些情况下也不起作用。
以下内容似乎更可靠:
[System.Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("username:APIKEY"))
%userprofile%.npmrc
中)的in_auth变量因此,最终文件如下所示:
registry=<URL>
_auth = <Base64 of username:APIKEY>
email = myemail@email.com
always-auth = true