-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Allow passing a credentials.toml
file path as a CLI arg for cargo login
and cargo publish
#13932
Comments
We support credentials from multiple sources, not just |
Good to know! Unless there's a solid plan and a deprecation date picked for removing All those other methods seem very good once they're implemented, but they seem like a pain to get right, and a pain to make sure the right credentials are used for the job. |
The plain text credential is all but deprecated. Tote that deprecation is separate from removal. This isn't so bad that we expect to break compatibility. However, i see it unlikely for us to add new features specific to plain text token management. The finishing of the deprecation is dependent on a documentation audit (and improving small workflow issues found along the way).
We have other credential managers today. |
See also #13623 for some possible approaches we might want for de-emphasizing plain text login. |
Since we tend to deprecate and discourage the usage, for me I wouldn't add more features for plaintext credentials. For implementing custom credential providers, the protocol accepts additional arguments so shouldn't be too complicated to roll out out something like |
Credentials like However, as stated above, it is probably not a good idea to store your credentials in an unencrypted plain file. |
Second. Close. |
Problem
Publishing crates with multiple accounts is a common-enough practice. It would be nice if one could run
cargo publish --cred ~/account1/cargo_cred.toml
to use account1's credentials.This feature should be added for both
cargo login
andcargo publish
(and any other subcommands I'm forgetting).Proposed Solution
Python's PyPI supports this functionality via the
--config <path>
arg (but--config
is already in use for cargo).--cred <path.toml>
is probably the next best option.Notes
No response
The text was updated successfully, but these errors were encountered: