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

"cargo owner --add" doesn't seem to work with teams #11505

Open
sophiajt opened this issue Dec 21, 2022 · 8 comments
Open

"cargo owner --add" doesn't seem to work with teams #11505

sophiajt opened this issue Dec 21, 2022 · 8 comments
Labels
A-documenting-cargo-itself Area: Cargo's documentation A-interacts-with-crates.io Area: interaction with registries C-bug Category: bug Command-owner E-easy Experience: Easy S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review

Comments

@sophiajt
Copy link

sophiajt commented Dec 21, 2022

Problem

We've tried a few different ways of adding a team to grant the publishing rights to Nushell's repo, but haven't been able for this to work.

Here's what we're seeing:

〉 cargo owner --add github:nushell:publishing
error: failed to invite owners to crate `nu` on registry at https://crates.io

Caused by:
  the remote server responded with an error: could not find the github team nushell/publishing

The team does exist on github:

image

Steps

  1. see above

Possible Solution(s)

It'd be nice to perhaps give a better error to help add a team if there's an issue with adding the specific team. Otherwise, I think this should work based on the name of the org + team.

Notes

No response

Version

cargo 1.66.0 (d65d197ad 2022-11-15)
release: 1.66.0
commit-hash: d65d197ad5c6c09234369f219f943e291d4f04b9
commit-date: 2022-11-15
host: aarch64-apple-darwin
libgit2: 1.5.0 (sys:0.15.0 vendored)
libcurl: 7.84.0 (sys:0.4.55+curl-7.83.1 system ssl:(SecureTransport) LibreSSL/3.3.6)
os: Mac OS 13.0.1 [64-bit]
@sophiajt sophiajt added the C-bug Category: bug label Dec 21, 2022
@weihanglo
Copy link
Member

Sorry about that. Looks like you hit this issue. Have you tried following that steps?

@sophiajt
Copy link
Author

Yes, I think that ultimately was it. I had to revoke permissions, then have crates.io ask for them again after revoking them (log out then log back in, and then it asks), then make sure that nushell was in the grant for the permissions it asked for.

Something that would help a lot here is to show some screenshots of the github and crates.io side. I read through the text a bunch but it didn't click what exactly was meant since I kept seeing crates.io listed in the oauth apps that had permission. It was only after the 5th read it finally hit me that it was too old to have the proper permissions granted.

@weihanglo weihanglo added A-documenting-cargo-itself Area: Cargo's documentation Command-owner A-interacts-with-crates.io Area: interaction with registries E-easy Experience: Easy E-help-wanted labels Dec 21, 2022
@VincentWo
Copy link

I could take over this issue if wanted :)

@weihanglo
Copy link
Member

@VincentWo go ahead! I guess adding one or two screenshots as what JT said under this paragraph is sufficient. You may need an org account to reproduce the error.

@VincentWo
Copy link

Will do - thank you for the pointer.

But I wonder whether it would also be a goal to improve the error message

@weihanglo
Copy link
Member

Oh yup. Nice suggestion! We could also provide a link to https://doc.rust-lang.org/cargo/reference/publishing.html#github-permissions in the error message.

@weihanglo weihanglo added S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review and removed E-help-wanted labels Apr 19, 2023
@torhovland
Copy link
Contributor

As discussed in #12511, I have opened a PR against crates.io here: rust-lang/crates.io#8593

@torhovland
Copy link
Contributor

I am actually not sure if the documentation is wrong or incomplete. Somebody with a GitHub org account should try to first login with a key without the read:org scope, and then figure out what needs to be cleaned up in order to get things working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documenting-cargo-itself Area: Cargo's documentation A-interacts-with-crates.io Area: interaction with registries C-bug Category: bug Command-owner E-easy Experience: Easy S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants