Skip to content

[ARTSEC-INT] kipz/private repo support#770

Open
harmonherring-pro wants to merge 7 commits into
theupdateframework:mainfrom
DataDog:kipz/private-repo-support
Open

[ARTSEC-INT] kipz/private repo support#770
harmonherring-pro wants to merge 7 commits into
theupdateframework:mainfrom
DataDog:kipz/private-repo-support

Conversation

@harmonherring-pro
Copy link
Copy Markdown

Brings in kipz's changes for private repo support

kipz added 7 commits April 16, 2026 14:31
Add support for authenticating to GitHub Pages when testing private
repositories. The test-repository action now accepts an optional
gh_token parameter that can be used to access private GitHub Pages
content.

Changes:
- Add AuthenticatedFetcher class implementing TUF FetcherInterface
- Add --gh-token CLI parameter to tuf-on-ci-test-client
- Update initial root download to support authentication
- Pass custom fetcher to TUF Updater when token is provided
- Add gh_token input parameter to test-repository action
- Update action script to conditionally pass token to client
- Document private repository setup in REPOSITORY-MAINTENANCE.md

The token parameter is optional and backward compatible. Public
repositories continue to work without any token. Private repositories
can use secrets.GITHUB_TOKEN for automatic authentication.
Convert urllib HTTPError to TUF DownloadHTTPError so the TUF client
can handle 404 errors gracefully when checking for root rotations.
Add custom HTTPRedirectHandler that preserves Authorization headers
across redirects. This fixes authentication issues when GitHub Pages
uses custom domains or when redirects occur before authentication.

The urllib default redirect handler doesn't preserve custom headers,
which caused authentication to fail after redirects. Now both the
initial root download and the AuthenticatedFetcher use an opener
with the custom redirect handler.
Added optional ref input parameter to both online-sign and update-issue
actions to allow explicit specification of which branch/tag/SHA to
checkout. This fixes issues where scheduled workflows (which run on
the default branch) need to checkout a different branch for TUF
operations.

When ref is not specified, actions/checkout will use its default
behavior (checking out the triggering ref).
@kommendorkapten
Copy link
Copy Markdown
Member

👋 Can please share more details around the context for this? It's totally possible today to run tuf-on-ci with a private repository so I'm not really sure what this is supposed to solve.

@kommendorkapten
Copy link
Copy Markdown
Member

Is the problem that you also have the GitHub page visibility set to private?

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.

3 participants