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

Cannot import role #3301

Open
nahsi opened this issue Dec 10, 2023 · 2 comments
Open

Cannot import role #3301

nahsi opened this issue Dec 10, 2023 · 2 comments

Comments

@nahsi
Copy link

nahsi commented Dec 10, 2023

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
Copy link
Author

nahsi commented Jan 21, 2024

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

@kernel-sanders
Copy link

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

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