Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fine-grained access-tokens #12465

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

tomberek
Copy link
Contributor

Motivation

Support fine-grained tokens, multiple tokens per host.

Context

Supports:

access-tokens = github.com/ORG/REPO=TOKEN

Fixes: #8474

@tomberek tomberek requested a review from edolstra as a code owner February 13, 2025 12:12
@github-actions github-actions bot added the fetching Networking with the outside (non-Nix) world, input locking label Feb 13, 2025
src/libfetchers/github.cc Show resolved Hide resolved
src/libfetchers/github.cc Outdated Show resolved Hide resolved
@tomberek tomberek requested a review from edolstra February 13, 2025 18:52
if(! url.empty()) {
for (auto & token : tokens) {
auto first = url.find(token.first);
if (
Copy link
Member

Choose a reason for hiding this comment

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

Does this still work? If url is e.g. https://github.com/..., then it won't match with a token for github.com anymore, right? You may need to use parseURL() to get rid of the scheme part of the URL.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fetching Networking with the outside (non-Nix) world, input locking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support multiple access tokens for github.com
2 participants