Skip to content

Commit e24967d

Browse files
committed
feat(auth-error): updated messaging for auth failure to be less token specific
1 parent 9bdfd06 commit e24967d

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

lib/definitions/errors.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,14 @@ Please make sure to create an [npm token](https://docs.npmjs.com/getting-started
4545
};
4646
}
4747

48-
export function EINVALIDNPMTOKEN({ registry }) {
48+
export function EINVALIDNPMAUTH({ registry }) {
4949
return {
50-
message: "Invalid npm token.",
51-
details: `The [npm token](${linkify(
50+
message: "Invalid npm authentication.",
51+
details: `The [authentication required to publish](${linkify(
5252
"README.md#npm-registry-authentication"
53-
)}) configured in the \`NPM_TOKEN\` environment variable must be a valid [token](https://docs.npmjs.com/getting-started/working_with_tokens) allowing to publish to the registry \`${registry}\`.
53+
)}) is not configured as needed.
5454
55-
If you are using Two Factor Authentication for your account, set its level to ["Authorization only"](https://docs.npmjs.com/getting-started/using-two-factor-authentication#levels-of-authentication) in your account settings. **semantic-release** cannot publish with the default "
56-
Authorization and writes" level.
57-
58-
Please make sure to set the \`NPM_TOKEN\` environment variable in your CI with the exact value of the npm token.`,
55+
Please verify your authentication configuration.`,
5956
};
6057
}
6158

0 commit comments

Comments
 (0)