Page 1 of 1

Error 429 Rate Limiting Question

Posted: Thu Nov 19, 2020 5:16 pm
by BLundmark
I understand what is happening here. I know that the company we are attempting to use this plugin for is rather large so ends up getting rate limited because of too many requests to the community repo.

I have setup and use my own repo for all the package installs and have no issues with that.

But Chocolately itself will only update from the main community repo it seems which is causing my rate limit issue.

Is there a way to also use my repo for the Chocolately update itself.

Below is the output from Automate when the update fails.
Chocolatey v0.10.15
Upgrading the following packages:
Chocolatey
By upgrading you accept licenses for the packages.
chocolatey v0.10.15 is the latest version available based on your source(s).
Chocolatey not upgraded. An error occurred during installation:
The remote server returned an error: (429) Too Many Requests. Too Many Requests
This is try 1/3. Retrying after 300 milliseconds.
Error converted to warning:
Could not find a part of the path 'C:\ProgramData\chocolatey\lib\chocolatey\.chocolateyPending'.
This is try 2/3. Retrying after 400 milliseconds.
Error converted to warning:
Could not find a part of the path 'C:\ProgramData\chocolatey\lib\chocolatey\.chocolateyPending'.
Maximum tries of 3 reached. Throwing error.

Chocolatey upgraded 0/0 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Could not find a part of the path 'C:\ProgramData\chocolatey\lib\chocolatey\.chocolateyPending'.

Re: Error 429 Rate Limiting Question

Posted: Fri Nov 20, 2020 2:05 pm
by Cubert
Hmmm... Good question.

When Chocolatey was installed it used the standard open community Choco path which would be saved in its configs for later upgrades I am assuming. I would then assume that that setting may be modifiable or if not a means to install chocolatey from your service would need to be done.


That would need to be an option in the main plugin config to use alternate Chocolatey source location. We would need to see what it takes to make that possible.

Re: Error 429 Rate Limiting Question

Posted: Fri Nov 20, 2020 3:12 pm
by BLundmark
That would be amazing if possible. My Owner group is pushing for me to drop this project and move to Third Party Patch Management inside of Automate.

This is way more flexible and I can manage a lot more software with this so would like to hang on to this if at all possible.

Thanks again for all your help on this.

Re: Error 429 Rate Limiting Question

Posted: Tue Nov 24, 2020 1:58 pm
by Cubert
This is what we call to install Chocolatey.

Code: Select all

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))




Where what you need is to be able to bypass that with:

Code: Select all

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('http://internal_raw_url/ChocolateyInstall.ps1'))

You would need to supply the following style URL

http://internal_raw_url/ChocolateyInstall.ps1


I think we could add this in with some ease. Let me toy with this through the holiday.

Re: Error 429 Rate Limiting Question

Posted: Tue Nov 24, 2020 5:18 pm
by BLundmark
Sounds good. Thanks so much for your assistance on this.