Skip to content

Cargo owner --add gives a confusing error message if the organization is blocking access #997

@debris

Description

@debris

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

Activity

carols10cents

carols10cents commented on Aug 24, 2017

@carols10cents
Member

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.

debris

debris commented on Aug 24, 2017

@debris
Author

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>

changed the title [-]Cargo owner --add fails[/-] [+]Cargo owner --add gives a confusing error message if the organization is blocking access[/+] on Aug 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-accountsC-bug 🐞Category: unintended, undesired behavior

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @carols10cents@debris

        Issue actions

          Cargo owner --add gives a confusing error message if the organization is blocking access · Issue #997 · rust-lang/crates.io