Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not add a team owner #2928

Closed
JanisGailis opened this issue Oct 20, 2020 · 2 comments
Closed

Can not add a team owner #2928

JanisGailis opened this issue Oct 20, 2020 · 2 comments

Comments

@JanisGailis
Copy link

JanisGailis commented Oct 20, 2020

Hi!

I'm trying to add a team owner to a crate using the following command:

cargo owner --add github:stcorp-no:s-t-rust

Then crates.io complains that the team can not be found:

    Updating crates.io index
error: failed to invite owners to crate usgs-eros-client: api errors (status 200 OK): could not find the github team stcorp-no/s-t-rust

But the team does exist:
image

Both the team, and the organization are new and pretty much empty, as we don't use Github internally.

Let me know if this is the wrong repo for this issue! I was not entirely sure.

Thanks!

@JohnTitor
Copy link
Member

JohnTitor commented Oct 20, 2020

Looks like this comment is related and might you, could you check the org permission?

rust-lang/cargo#5297 (comment)

@JanisGailis
Copy link
Author

Thank you, this did highlight what was the problem!

The problem was that I had authenticated crates.io before the organization was created, so crates.io was not authorized to access it. Logging out of everything, revoking crates.io OAuth access, and logging into crates.io again forced re-authorization and authorization propagation to the organization.

After doing this, it works as expected.

bors added a commit to rust-lang/cargo that referenced this issue Jan 10, 2021
Document `could not find the github team` error on `cargo owner --add`

When running `cargo owner --add`, the `could not find the github team` error often occurs due to lack of the permissions.
Example cases: #5297 (comment), rust-lang/crates.io#2928

I think it's worth documenting that error and the possible solution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants