Cannot update - Rate limit exceeded

You can add a personal API key for your own github account in config.yaml to try and increate the limits.

plugins:
  softwareupdate:
    # global credentials to provide to version checks
    credentials:

      # GitHub API token to use for the github_release and github_commit version checks.
      # Helpful if you regularly run into rate limit issues with the GitHub API using
      # the default anonymous access. Use a personal access token:
      #   https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token
      # Unset by default
      github:

excerpt from full documentation here.

1 Like

Thanks Jneilliii, I will have to look into setting that up.

most likely it had automatically checked within the last hour, and forcing the updated just added up to max queries exceeded before it checked all the plugins

To answer this - the update check previously failed silently, as of 1.5.0 there's a warning in the UI. The rate limit is 60 requests per hour, which can be easily exceeded since each plugin and OctoPrint itself uses at least one request.

1 Like

Thanks Charlie, that makes sense. I have looked at how I can add the API key for github. I am trying to figure it out but is there a tutorial somewhere on how to do this to prevent this rate limited error from happening? It sounds like you can increase the checks using this method?

Is is possible to get an example of what I need to add to the config.yaml file? It sounds like I get a key from github and enter it in somehow?

You'll need a token from the link above, https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token then find and edit config.yaml to add the section above.

I was going to suggest using the config CLI but due to a bug that's currently broken.

So you have to find the config.yaml file, open it up and find the plugins section, and then the softwareupdate section. You will have to create the credentials section, then add your token. The example given above should be enough, there's probably a bunch of other plugins settings in there so you probably will have to do some digging. Be sure to use 4 spaces to indent, not tabs.

1 Like

So in this example from Jneilliii I would simply add my API token after the 'github:' entry? Is there some specific way I need to type the key in or just enter it in after the entry?

For Example:
github: githubAPIkeyhere

Also to edit the config.yaml file I simply need to enter 'sudo config.yaml'?

Correct on the first bit, don't use sudo to open the file - you'll break the permissions. Just run nano ~/.octoprint/config.yaml

Thanks again! Is that the correct directory you have listed or will I need to figure out where it is? :slight_smile:

~/.octoprint/config.yaml should be where it is, that's the default home. So it would be somewhere else unless you changed it, which you'd know.

So I guess I did something wrong.
This is what I have:
Capture2

Now Octoprint won't launch.

Is it in the right area? I had to space out 8-12 spaces to line it up. Also credentials would be my user name on github correct?

It should be

    softwareupdate:
        credentials:
            github: <your github personal access token goes here>

Your token IS your whole credentials.

Thank you Foosel, Charlie, jneillii and 5ft24!

I believe it is finally working. At least Octoprint boots now with the proper formatting.

1 Like

Man, foosel gets the Solution, even though I provided the exact same correct answer, with links to docs and everything...what a sham....

just kidding, glad you got it worked out.

3 Likes

Ah I wish I could give more than one. :slight_smile:

You gave me the information but it took me a bit to process it and be clear on what exactly needs to be done. You all are great in my book. Again thanks for all the help. I hope it is working. It seems like it is but perhaps there will be other questions. :smile:

I will have to see how things work with new updates and if I still get the error messages. Using this method what is the limit with the github token?

Doing a quick search it appears that it's something like 5000 requests per hour.

1 Like

Thanks jneilliii. Hopefully that will be enough. :slight_smile:

Once again, you are my hero!!! Here I just accepted the fact that I wouldn't be able to have a maintenance day where I updated Octoprint and/or plugins at once for all my instances and had to spread it over a couple days.

That came out of a Discord or issue brainstorming session IIRC, all credit goes to @foosel for implementing it.

Hi I am having this issue. First, none of this (github credentials) exist in config.yaml I entered it in the plugin section but it does nothing. Also I tried the command lineinterface but I get command not found for all commands regarding this as well.

Is any of this still a part of octoprint? Is there any way to be able to update octoprint? I found it strange that all of the info in this thread is not in the config.yaml but everyone else seemsto have it. Am I missing something?