Skip to content

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

Merged
MichaelEischer merged 2 commits into
restic:masterfrom
Paulomen2712:add_self_update_github_token
Nov 17, 2025
Merged

Allow for a personal token to be specified for self-updates#5568
MichaelEischer merged 2 commits into
restic:masterfrom
Paulomen2712:add_self_update_github_token

Conversation

@Paulomen2712

@Paulomen2712 Paulomen2712 commented Oct 22, 2025

Copy link
Copy Markdown
Contributor

What does this PR change? What problem does it solve?

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

Was the change previously discussed in an issue or on the forum?

Closes #3738

Checklist

  • I have added tests for all code changes.
  • I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • I'm done! This pull request is ready for review.

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
@Paulomen2712 Paulomen2712 force-pushed the add_self_update_github_token branch 2 times, most recently from cec9839 to 77331c7 Compare October 22, 2025 13:10

@MichaelEischer MichaelEischer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! I have a few small remarks, see below

Comment thread doc/020_installation.rst Outdated
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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move that to a separate paragraph. Add a short remark on why one would want to do this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully what I reworded is enough?

Comment thread changelog/unreleased/issue-3738 Outdated
Comment thread internal/selfupdate/github.go Outdated
Comment thread internal/selfupdate/github_test.go Outdated
Comment thread internal/selfupdate/github_test.go Outdated
@Paulomen2712 Paulomen2712 force-pushed the add_self_update_github_token branch 2 times, most recently from 087fa69 to 72cef5c Compare November 17, 2025 13:26
@Paulomen2712

Copy link
Copy Markdown
Contributor Author

Thank you for your review @MichaelEischer! Hopefully my changes fix what you suggested :)

@Paulomen2712 Paulomen2712 force-pushed the add_self_update_github_token branch from 72cef5c to 8784bbb Compare November 17, 2025 13:39

@MichaelEischer MichaelEischer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@MichaelEischer MichaelEischer merged commit c1a89d5 into restic:master Nov 17, 2025
12 checks passed
kikoqiu pushed a commit to kikoqiu/restic that referenced this pull request Nov 26, 2025
)

* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

self-update could recognize a personal GitHub token for higher rate limits

2 participants