ansible / galaxy

Legacy Galaxy still available as read-only on https://old-galaxy.ansible.com - looking for the new galaxy -> https://github.com/ansible/galaxy_ng
Apache License 2.0
855 stars 329 forks source link

Cannot import role #3301

Open nahsi opened 11 months ago

nahsi commented 11 months ago

Bug Report

SUMMARY

I cannot import role to ansible galaxy.

STEPS TO REPRODUCE

ansible-galaxy role import --token $GALAXY_TOKEN nahsilabs ansible-base-ubuntu

EXPECTED RESULTS

role added to ansible galaxy to nahsilabs namespace

ACTUAL RESULTS

ERROR! None (HTTP Code: 500, Message: Internal Server Error)

adding -v or -vvv does nothing If I run

ansible-galaxy role import --token $GALAXY_TOKEN --role-name base_ubuntu  nahsi nahsilabs/ansible-base-ubuntu

I get

Successfully submitted import request 2057858807636606096277672484234650080
Starting import: task_id=2057858807636606096277672484234650080, pulp_id=018c5445-c9f8-7db0-991b-a03ad2f4e1e0

==== PARAMETERS ====
importer username: nahsi
matched user: nahsi id:4752
github_user: nahsi
github_repo: nahsilabs/ansible-base-ubuntu
github_reference: None
alternate_role_name: base_ubuntu

==== CHECK FOR MATCHING ROLE(S) ====
user:nahsi repo:nahsilabs/ansible-base-ubuntu did not match any existing roles

===== CLONING REPO =====
cloning https://github.com/nahsi/nahsilabs/ansible-base-ubuntu ...
cloning failed: Cloning into '/tmp/tmpp4qhidy0/nahsilabs/ansible-base-ubuntu'...
remote: Not Found
fatal: repository 'https://github.com/nahsi/nahsilabs/ansible-base-ubuntu/' not found
nahsi commented 10 months ago

Sorry to bother you, but it is been more than a month. Anything to share?

kernel-sanders commented 8 months ago

You have to use the undocumented API to accomplish this.

curl -v -X POST \
    -H 'Authorization: token YOURAPITOKEN' \
    -H 'Content-Type: application/json' \
    -d '{"github_user": "nahsi", "github_repo": "ansible-base-ubuntu", "alternate_clone_url": "https://github.com/nahsilabs/ansible-base-ubuntu" }' \
    https://galaxy.ansible.com/api/v1/imports/

That should return an ID value that you can check with

curl -v -X GET \
    -H 'Authorization: token YOURAPITOKEN' \
    https://galaxy.ansible.com/api/v1/imports?id=IDVALUE