Hirevo / alexandrie

An alternative crate registry, implemented in Rust.
https://hirevo.github.io/alexandrie/
Apache License 2.0
493 stars 55 forks source link

cargo owner --add error #156

Closed foosaa closed 1 year ago

foosaa commented 1 year ago
cargo owner -a abc --registry xxx

Error info:

    Updating `xxx` index
error: failed to invite owners to crate `crate-name` on registry at http://......

Caused by:
  invalid type: string "true", expected a boolean at line 1 column 56

I add a user to the crate, and the above error occurs, how can I solve it? Thanks!!!

Hirevo commented 1 year ago

I am indeed able to reproduce this, thanks for filing the issue.

While an error indeed shows up on the command-line, your operation should have worked and the new owner should have been successfully added.

You can try to run the following command to check if the operation has indeed still went through:

cargo owner --registry xxx abc --list

Or if you are using the frontend, you can check if the new owner is listed on the crate page for abc.

foosaa commented 1 year ago

When i execute:

cargo owner --registry xxx abc --list

only see myself

Hirevo commented 1 year ago

I've now merged PR #157, which should solve the error message you were seeing.

Maybe you can try to update the Alexandrie instance, retry your original cargo owner --add command and see what the new output is ?

Also, Alexandrie is expecting the email address of the user to be used for these commands.
In your original command, was abc the email address of the invitee ?

(Sorry for the closing and re-opening of the issue, this was due to me merging the PR)

foosaa commented 1 year ago

@Hirevo

Hi, Hirevo. Thank you for your hard work. I saw that the issue has been resolved after the update. To enter a specific crate directory, execute: cargo owner --add user@email.com --registry registryName Will receive the following prompt:

Updating `registryName` index
       Owner  has been added as authors of crateName

To view the owner list, use the command: cargo owner --list --registry registryName Will receive the following prompt:

Updating `registryName` index
user1@email.com (user1)
user2@email.com (user2)

After verification, the added owners can also publish the crate.

Thank you once again, Hirevo.