Closed
Description
Current Behavior
I (unintentionally and without noticing) entered a bad API token via cargo login
(see below). Then cargo publish
and cargo owner
, including cargo owner --list
, give the following error:
> cargo owner --list windows
Updating crates.io index
error: failed to list owners of crate `windows` on registry at https://crates.io
failed to get a 200 OK response, got 400
headers:
HTTP/2 400
content-length: 0
server: nginx
date: Sun, 08 Jan 2023 17:06:47 GMT
strict-transport-security: max-age=31536000; includeSubDomains
via: 1.1 vegur, 1.1 319f376925908156190f5fc160137b42.cloudfront.net (CloudFront)
x-cache: Error from cloudfront
x-amz-cf-pop: FRA60-P3
x-amz-cf-id: eclND8Emct0Dx-QEsF7G9Wn4NP_6iHfFegsmX7UxsQxr1X89yRw6og==
body:
The credentials
file ended up looking like this after I hit Ctrl+V
to insert my token on the command line (and at first I didn't notice that this didn't work correctly):
[registry]
token = "\u0016"
Expected Behavior
A more helpful error message that tells me that my API token is wrong or ill-formed.
Steps To Reproduce
No response
Environment
Windows 10, using PowerShell within Windows Terminal or VS Code
Anything else?
No response