403 for Galaxy API when publishing collection to galaxy.ansible.com

Publishing for our collection to Galaxy is broken. It has been working fine for years, so this is presumably since the 30 Sep 2023 changes to “new Galaxy”. What do we need to change?

Error message:
ERROR! Error when finding available api versions from release_galaxy (https://galaxy.ansible.com/) (HTTP Code: 403, Message: Forbidden)

Thank you :slight_smile:


I’m seeing the same 403 error trying to publish my role as well, using GitHub Actions:

It also appears that links to published collections are broken.

https://galaxy.ansible.com/equinix/cloud/ no longer works, but
https://galaxy.ansible.com/ui/repo/published/equinix/cloud/ does.

(the forum embed behavior is interesting too)



If the URL structure has to change, redirects should be put in place.

I’m hitting the same errors as well. Tried publishing two updates to my roles today, and both failed:


Run ansible-galaxy role import --api-key *** $(echo geerlingguy/ansible-role-solr | cut -d/ -f1) $(echo geerlingguy/ansible-role-solr | cut -d/ -f2)
  ansible-galaxy role import --api-key *** $(echo geerlingguy/ansible-role-solr | cut -d/ -f1) $(echo geerlingguy/ansible-role-solr | cut -d/ -f2)
  shell: /usr/bin/bash -e {0}
    pythonLocation: /opt/hostedtoolcache/Python/3.11.5/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.5/x64/lib
ERROR! Error when finding available api versions from default (https://galaxy.ansible.com) (HTTP Code: 403, Message: Forbidden)
Error: Process completed with exit code 1.

I’m assuming this is also related, but when logging into the UI, it looks like I’m no longer the owner of my previous namespace freemanlatrell, and now only have access to a new namespace called freemanlatrell1 that I didn’t create.

Sounds similar to this: Namespace changed and collection upload not working

That’s expected: New Ansible Galaxy codebase, URLs to collections on Galaxy change · Issue #59 · ansible-collections/news-for-maintainers · GitHub

The 403 was not expected

1 Like

I’ve since heard that API keys need to be regenerated due to the move to Galaxy NG on 30 Sept 2023. I can’t test this until someone in my team gets back to me to get me access to regen the keys…

Where can that be done? I haven’t been able to find a place to generate or regenerate keys…

Can you do it here?

1 Like

The freemanlatrell namespace should be fixed now.


Ok, looks like a newly regenerated API key (obtainable from Galaxy NG) has done the trick. I saw many posts about things that would change with Galaxy NG, but this was not one of them. I hope this post helps others who get the same error :slight_smile:

1 Like

All good now. Thanks

Looks like that page (Collections > API Token) was the ticket for my GALAXY_API_TOKEN; how does one find that page outside of going to Collections? I tried finding it under my account, and couldn’t. I only visit the collections tab once in a blue moon…

I hear you, makes more sense to be in the My Profile area, but don’t shoot the messenger :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.