Allow for a personal token to be specified for self-updates (#5568)

* Allow for a personal token to be specified for self-updates

This change will allow for setting the $GITHUB_ACCESS_TOKEN environment variable with a Github personal access token, allowing e.g. for higher rate limits

* Refactor github request and add test

---------

Co-authored-by: Paulo Saraiva <pauloman@cern.ch>
This commit is contained in:
Paulo Saraiva
2025-11-17 21:39:39 +01:00
committed by GitHub
parent 3826167474
commit c1a89d5150
4 changed files with 71 additions and 9 deletions

View File

@@ -25,7 +25,12 @@ you can download and run without having to do additional installation work.
Please see the :ref:`official_binaries` section below for various downloads.
Official binaries can be updated in place by using the ``restic self-update``
command.
command.
The environment variable ``$GITHUB_ACCESS_TOKEN`` can be set to use a personal
access token when updating. This increases the rate limit through authenticated GitHub API
requests, and prevents update failures when many
unauthenticated requests have already been made from the same IP.
Alpine Linux
============