Cargo owner --add gives a confusing error message if the organization is blocking access
Also cargo owner --add constantly fails with.
error: failed to add owners to crate plain_hasher: api errors: It looks like you don't have permission to query a necessary property from Github to complete this request. You may need to re-authenticate on crates.io to grant permission to read github org memberships. Just go to https://crates.io/login
When I entered the website, I got logged out after refreshing the page. Might be related to #986
cargo owner --add is functioning as I would expect.
Are you trying to add a user or a team?
If a team, github recently changed their oauth implementation, and you have to explicitly grant access for each oauth token to each organization, and the organization must not be blocking access. We have some docs for this here: http://doc.crates.io/crates-io.html#github-permissions
Please let me know if this resolves your issue.
I'm trying to add a team. Thank you for the link! I will contact my organization admin and see if it works.
In the meantime, after I've reauthorized crates.io for my profile, I've tried to add my organization anyway (even though I knew It will fail).
That's the error message I got. I think it's a regression compared to what it used to be ;)
cargo owner --add github:paritytech:core-devs
Updating registry `https://github.com/rust-lang/crates.io-index`
Owner adding ["github:paritytech:core-devs"] to crate plain_hasher
error: failed to add owners to crate plain_hasher: failed to get a 200 OK response, got 502
headers:
HTTP/1.1 100 Continue
HTTP/1.1 502 Bad Gateway
Connection: keep-alive
Server: nginx
Date: Thu, 24 Aug 2017 15:39:56 GMT
Content-Type: text/html
Content-Length: 166
Strict-Transport-Security: max-age=31536000
Via: 1.1 vegur
body:
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>