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

Breaking change to cargo login #12828

Closed
Diggsey opened this issue Oct 15, 2023 · 4 comments · Fixed by #12830
Closed

Breaking change to cargo login #12828

Diggsey opened this issue Oct 15, 2023 · 4 comments · Fixed by #12830
Labels
C-bug Category: bug Command-login regression-from-stable-to-stable Regression in stable that worked in a previous stable release.

Comments

@Diggsey
Copy link
Contributor

Diggsey commented Oct 15, 2023

Problem

SInce updating to Cargo 1.73, the cargo login command no longer accepts the token after --.

Used to work:
cargo login -- <token>

This now re-requests the token if in an interactive terminal, or else prints the confusing error:

error: credential provider cargo:token *** failed action login

Caused by:
please provide a non-empty token

This is mostly an issue for CI.

@Diggsey Diggsey added C-bug Category: bug S-triage Status: This issue is waiting on initial triage. labels Oct 15, 2023
@weihanglo
Copy link
Member

Oops. That was an unexpected side effect when we added the support of credential providers in nightly, which will be landed in 1.74. (In #12499 we did the change).

Trailing arguments for cargo login was supported unintentionally. Since now trailing arguements are passed to upcoming credential plugins, there is little chance the behavior will be reverted 😞.

Could you try if cargo login <token> works for you? That should be well-supported but if not please let us know.

@weihanglo weihanglo added Command-login S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request. regression-from-stable-to-stable Regression in stable that worked in a previous stable release. and removed S-triage Status: This issue is waiting on initial triage. labels Oct 15, 2023
@Diggsey
Copy link
Contributor Author

Diggsey commented Oct 15, 2023

Yeah I've fixed it in my CI by removing -- but thought I'd open an issue since breaking changes are not expected. Feel free to close if there's nothing to be done.

@Diggsey
Copy link
Contributor Author

Diggsey commented Oct 15, 2023

(Also this might be useful if anyone else googles "please provide a non-empty token" - when I did the only result was the cargo source!)

@weihanglo
Copy link
Member

It's so nice of you to open this issue!

I am thinking of putting a compatibility notice in CHANGELOG.md under 1.73 Changed section, calling out this unfortunate with an big ❗.

Going to do that later today, or if someone is faster than me please do it :)

@weihanglo weihanglo removed the S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request. label Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug Command-login regression-from-stable-to-stable Regression in stable that worked in a previous stable release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants