Skip to content

Show more informative error message on crate publish when github org doesn't have the right oauth permissions #932

Open
@Manishearth

Description

@Manishearth

So today I tried publishing the app_units crate.

I got the error error: api errors: crate name has already been claimed by another user.

Except I've published this crate before.

I poked deeper and the crate owners are glennw and servo:cargo-publish. I am a member of the cargo-publish org.

It turns out that Servo had tightened up org security, and one thing that was done was disallow access to all OAuth applications by default, with opt-in. So crates.io was unable to figure out who servo:cargo-publish consists of, and instead of giving a helpful error, it just told me I wasn't an owner.

It should give an error like "If you are a member of the cargo-publish group on the servo github org, please get servo to approve crates.io by following these steps" instead, I suspect GitHub does return a particular error code when an OAuth app is unable to access an org.

(crates.io issue because I'm sure cargo doesn't have enough info to compute this)

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions