# Galaxy - 500 errors / API Key Not Working

**URL:** <https://forum.ansible.com/t/galaxy-500-errors-api-key-not-working/1305>\
**Category:** Get Help\
**Tags:** galaxy-ng\
**Created:** [October 2, 2023, 6:52pm UTC](https://forum.ansible.com/t/galaxy-500-errors-api-key-not-working/1305 "2023-10-02T18:52:16Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![jvanderaa](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jvanderaa/32/569_2.png) [@jvanderaa](https://forum.ansible.com/u/jvanderaa)\
**Post date:** [October 2, 2023, 6:52pm UTC](https://forum.ansible.com/t/galaxy-500-errors-api-key-not-working/1305/1 "2023-10-02T18:52:16Z")

</div>

First I was attempting to publish a new version of our collection via `ansible-galaxy collection publish` command and I got a 403 error. So I went to try to investigate what was going on with my token. Then when attempting to log in I’m now getting server 500 errors.

---

<div class="post-metadata">

**Author:** ![jvanderaa](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jvanderaa/32/569_2.png) [@jvanderaa](https://forum.ansible.com/u/jvanderaa)\
**Post date:** [October 2, 2023, 6:53pm UTC](https://forum.ansible.com/t/galaxy-500-errors-api-key-not-working/1305/2 "2023-10-02T18:53:02Z")

</div>

Note that the login was using GitHub auth.

---

<div class="post-metadata">

**Author:** ![BVollmerhaus](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bvollmerhaus/32/1350_2.png) [@BVollmerhaus](https://forum.ansible.com/u/BVollmerhaus)\
**Post date:** [October 2, 2023, 8:40pm UTC](https://forum.ansible.com/t/galaxy-500-errors-api-key-not-working/1305/3 "2023-10-02T20:40:00Z")

</div>

Same here; my existing API token appears to be invalid (which is fine), but I cannot log in to Galaxy NG to obtain a new one or even just update my published collection. Galaxy prompted me to authorize my GitHub account again and now immediately returns a 500 upon attempting to log in.

---

<div class="post-metadata">

**Author:** ![jeffkala](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jeffkala/32/940_2.png) [@jeffkala](https://forum.ansible.com/u/jeffkala)\
**Post date:** [October 2, 2023, 10:08pm UTC](https://forum.ansible.com/t/galaxy-500-errors-api-key-not-working/1305/4 "2023-10-02T22:08:11Z")

</div>

Same issue on my end. Tried to revoke my Github auth application grants as well and re-establishing the oauth flow again still results in 500 from galaxy.

---

<div class="post-metadata">

**Author:** ![kolesaev](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kolesaev/32/879_2.png) [@kolesaev](https://forum.ansible.com/u/kolesaev)\
**Post date:** [October 3, 2023, 6:48am UTC](https://forum.ansible.com/t/galaxy-500-errors-api-key-not-working/1305/5 "2023-10-03T06:48:57Z")

</div>

Hi there.

I had the same issue

 ![image](https://us1.discourse-cdn.com/ansible/original/1X/82196a93fe30186b8d710f3648e2cbda26a5d164.png)

and i have just found a solution.

You will need to open your GitHub Account Settings, go to Applications and open an Authorized OAuth Apps tab, or try to open a link below, then revoke all Ansible Galaxy applications.  
[https://github.com/settings/applications](https://github.com/settings/applications)

As i understand, it happenes because of GitHub stores Legasy-Ansible-Galaxy keys in its Authorized OAuth App

---

<div class="post-metadata">

**Author:** ![jvanderaa](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jvanderaa/32/569_2.png) [@jvanderaa](https://forum.ansible.com/u/jvanderaa)\
**Post date:** [October 3, 2023, 12:04pm UTC](https://forum.ansible.com/t/galaxy-500-errors-api-key-not-working/1305/6 "2023-10-03T12:04:42Z")

</div>

I didn’t have to do anything this morning and now it is working. Guessing that there was in fact some system issues at some point.

---

<div class="post-metadata">

**Author:** ![BVollmerhaus](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bvollmerhaus/32/1350_2.png) [@BVollmerhaus](https://forum.ansible.com/u/BVollmerhaus)\
**Post date:** [October 3, 2023, 1:15pm UTC](https://forum.ansible.com/t/galaxy-500-errors-api-key-not-working/1305/7 "2023-10-03T13:15:00Z")

</div>

Can confirm, and generating a new API token worked as well, thankfully. Quite scary, though.

---

<div class="post-metadata">

**Author:** ![johrstrom](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/johrstrom/32/959_2.png) [@johrstrom](https://forum.ansible.com/u/johrstrom)\
**Post date:** [October 3, 2023, 3:04pm UTC](https://forum.ansible.com/t/galaxy-500-errors-api-key-not-working/1305/8 "2023-10-03T15:04:48Z")

</div>

My API keys are not working either. I’m trying to upload a role in a github action. I only see API keys under the collections tab. Does that mean I can no longer upload just a role?

(also I would open a new topic - but I can’t seem to do so…)

---

<div class="post-metadata">

**Author:** ![gwmngilfen](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/gwmngilfen/32/6_2.png) [@gwmngilfen](https://forum.ansible.com/u/gwmngilfen)\
**Post date:** [October 3, 2023, 3:07pm UTC](https://forum.ansible.com/t/galaxy-500-errors-api-key-not-working/1305/9 "2023-10-03T15:07:55Z")

</div>

There’s no restrictions on creating a new topic, @johrstrom, you should be able to. Are you getting an error of some kind?

EDIT: moved here: [Can't seem to start a new topic via button (works by URL)](http://forum.ansible.com/t/cant-seem-to-start-a-new-topic-via-button-works-by-url/1366)

---

<div class="post-metadata">

**Author:** ![gwmngilfen](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/gwmngilfen/32/6_2.png) [@gwmngilfen](https://forum.ansible.com/u/gwmngilfen)\
**Post date:** [October 3, 2023, 3:59pm UTC](https://forum.ansible.com/t/galaxy-500-errors-api-key-not-working/1305/10 "2023-10-03T15:59:50Z")

</div>

2 posts were split to a new topic: [Can;t seem to start a new topic via button (works by URL)](https://forum.ansible.com/t/can-t-seem-to-start-a-new-topic-via-button-works-by-url/1366)

---

<div class="post-metadata">

**Author:** ![joelwking](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/joelwking/32/980_2.png) [@joelwking](https://forum.ansible.com/u/joelwking)\
**Post date:** [October 3, 2023, 7:01pm UTC](https://forum.ansible.com/t/galaxy-500-errors-api-key-not-working/1305/11 "2023-10-03T19:01:37Z")

</div>

I revoked the Authorize OAuth APPs and continue to see a Server Error (500)

---

<div class="post-metadata">

**Author:** ![joelwking](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/joelwking/32/980_2.png) [@joelwking](https://forum.ansible.com/u/joelwking)\
**Post date:** [October 4, 2023, 1:54pm UTC](https://forum.ansible.com/t/galaxy-500-errors-api-key-not-working/1305/12 "2023-10-04T13:54:35Z")

</div>

This morning it works.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [November 3, 2023, 1:55pm UTC](https://forum.ansible.com/t/galaxy-500-errors-api-key-not-working/1305/13 "2023-11-03T13:55:01Z")

</div>

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