Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cargo suggests _TOKEN environment variable even when it would not be applicable #12642

Closed
arlosi opened this issue Sep 7, 2023 · 0 comments · Fixed by #12644
Closed

Cargo suggests _TOKEN environment variable even when it would not be applicable #12642

arlosi opened this issue Sep 7, 2023 · 0 comments · Fixed by #12644
Labels
A-credential-provider Area: credential provider for storing and retreiving credentials A-registry-authentication Area: registry authentication and authorization (authn authz)

Comments

@arlosi
Copy link
Contributor

arlosi commented Sep 7, 2023

When a registry token cannot be found, or a token is invalid, cargo displays an error recommending cargo login.

Starting in rust 1.67 with #10592, the message was amended to include the environment variable that could also be used to include the token.

error: no token found for `alternative`, please run `cargo login --registry alternative`
or use environment variable CARGO_REGISTRIES_ALTERNATIVE_TOKEN

With -Z credential-process, if cargo:token is not in registry.global-credential-providers or registries.<NAME>.credential-provider the suggested environment variable will not work.

@arlosi arlosi added A-credential-provider Area: credential provider for storing and retreiving credentials A-registry-authentication Area: registry authentication and authorization (authn authz) labels Sep 7, 2023
@bors bors closed this as completed in 4518131 Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-credential-provider Area: credential provider for storing and retreiving credentials A-registry-authentication Area: registry authentication and authorization (authn authz)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant