galaxy: Failed to get data from the API server: HTTP Error 403: Forbidden
Bug Report
SUMMARY
galaxy API returns 403 and fails to install role
ansible-galaxy --version
ansible-galaxy 2.8.2
STEPS TO REPRODUCE
ansible-galaxy install nusenu.relayor
[WARNING]: - nusenu.relayor was NOT installed successfully: Failed to get data from the API server
(https://galaxy.ansible.com/api/): HTTP Error 403: Forbidden
ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.
EXPECTED RESULTS
The role should be downloaded and installed
ACTUAL RESULTS
see above
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 2
- Comments: 17 (3 by maintainers)
@stevenengland In my case the issue was the following: the Galaxy service has migrated to Galaxy NG but that did not migrate the access token information for the old Galaxy account. Thus my old token set in ansible.cfg did not work and that caused the issue. Once I have figured that out, I created the new token for Galaxy NG and added it to ansible.cfg and the issue was solved. Hope this may help someone too.
Getting the same error in GitHub Actions. Worked 2 months ago:
Same issue for me when using AWX 23.3.1 and/or 23.4.0, I have followed @drew1kun suggestion of creating an access token and that did the trick