Inversed-Tech / eyelid

Private iris matching
Apache License 2.0
0 stars 0 forks source link

Allow crates.io to see Inversed Tech teams #23

Closed teor2345 closed 3 months ago

teor2345 commented 3 months ago

When I run this command:

for crate in eyelid-*; do
  pushd $crate;
  cargo owner --add github:inversed-tech:crate-publishers;
  popd;
done

I get the error:

error: failed to invite owners to crate `eyelid-test` on registry at https://crates.io

Caused by:
  the remote server responded with an error (status 400 Bad Request): could not find the github team inversed-tech/crates

This is probably because the "crates.io" OAuth app doesn't have permissions to see teams in the Inversed Tech organisation. Organisation owners or admins can grant those permissions by following these instructions:

  1. Go to https://github.com/organizations/Inversed-Tech/settings/oauth_application_policy
  2. Approve the "crates.io" third-party application access, and delete any restrictions
  3. Go to https://github.com/settings/connections/applications/9fe8110dfe185fe90b5c (or https://github.com/settings/connections/applications and click "crates.io")
  4. Approve organisation-level access

https://doc.rust-lang.org/cargo/reference/publishing.html#github-permissions

An owner or admin can also delete these extra teams:

teor2345 commented 3 months ago

Thanks for fixing this, I ran the command and it worked:

$ for crate in eyelid-*; do pushd $crate; cargo owner --add github:inversed-tech:crate-publishers; popd; done
~/dev/eyelid/eyelid-match-ops ~/dev/eyelid
    Updating crates.io index
       Owner team github:inversed-tech:crate-publishers has been added as an owner of crate eyelid-match-ops
~/dev/eyelid
~/dev/eyelid/eyelid-matcher ~/dev/eyelid
    Updating crates.io index
       Owner team github:inversed-tech:crate-publishers has been added as an owner of crate eyelid-matcher
~/dev/eyelid
~/dev/eyelid/eyelid-test ~/dev/eyelid
    Updating crates.io index
       Owner team github:inversed-tech:crate-publishers has been added as an owner of crate eyelid-test
~/dev/eyelid
teor2345 commented 3 months ago

@emmorais will appear on crates.io when he accepts the invite:

$ for crate in eyelid-*; do pushd $crate; cargo owner --add emmorais; popd; done
~/dev/eyelid/eyelid-match-ops ~/dev/eyelid
    Updating crates.io index
       Owner user emmorais already has a pending invitation to be an owner of crate eyelid-match-ops
~/dev/eyelid
~/dev/eyelid/eyelid-matcher ~/dev/eyelid
    Updating crates.io index
       Owner user emmorais already has a pending invitation to be an owner of crate eyelid-matcher
~/dev/eyelid
~/dev/eyelid/eyelid-test ~/dev/eyelid
    Updating crates.io index
       Owner user emmorais already has a pending invitation to be an owner of crate eyelid-test
~/dev/eyelid
teor2345 commented 3 months ago

Confirmation from https://crates.io/search?q=eyelid

Screenshot 2024-04-08 at 09 14 29 Screenshot 2024-04-08 at 09 14 50 Screenshot 2024-04-08 at 09 15 01