Skip to content

Something's not right with cargo login/token migration to ~/.cargo/credentials (regression in nightly) #4199

Closed
@carols10cents

Description

@carols10cents

I think this is related to the changes in #3978.

I'm currently using cargo 0.21.0-nightly (50b1c24 2017-06-17).

What happened:

  • I logged in with my crates.io credentials (I change my token all the time because reasons):
cargo login [api-token]
  • I then attempted to publish a new crate to crates.io, so I ran:
cargo publish
  • I got an "unauthorized API access" error.

  • I noticed I now have ~/.cargo/config and ~/.cargo/credentials.

~/.cargo/config:

[registry]
token = "[not-the-one-i-just-used-with-cargo-login]"

~/.cargo/credentials:

token = "[api-token]"

So it looks like cargo login is now only updating ~/.cargo/credentials but cargo publish is reading from ~/.cargo/config?

This has not made it to beta yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions