GitHub's inaccurate Error 401 on authorised GitHub API's

I have a python script which fetches a list of releases from a list of GitHub releases API.

Now, my blood pressure of starting to reach boiling point, because I just keep getting the same error message: `401, over and over again.

There is no reason for this other than the fact that it just wants to be difficult, my code is correct, my API token is valid and my repo’s are public.

Why is GitHub this thing telling me that its unauthorised when it is completely authorised. Why is this under the impression that it is unauthorised when I am telling it that it is.

This is so silly.

Error in checking for updates - Unfortunately, there was an error in checking for updates. Please find the following error message 401 Client Error: Unauthorized for url: https://api.github.com/repos/BlauweStadTechnologieen/create-virtual-environment/tags

This is my repo MRP

GitHub Repository

From the repo, you run the software_updater.py module.

Getting really sick of seeing the number 401 now.

How many times are you running the script over and over before getting the 401? I sort of wonder if this is a rate limit (with a weird error code).

Also I wonder if you are using an https clone url with invalid credentials. Maybe try removing the credentials or swap to ssh keys?

(Edit:

I noticed the url is an api.github.com instead of a regular clone url. That seems odd. API tokens have various primary and secondary rate limits. Could be hitting one of those)

It might be a bug in the github servers.
The service will be made up of lots of servers, maybe one of them is broken and cannot handle tour request.
It would be random if you hit the bad server for a request.

Often with network code I have had a recovered from unexpected failures.