Trusted Publishers: use the hf CLI for the OIDC exchange#2546
Merged
Conversation
coyotte508
approved these changes
Jun 10, 2026
coyotte508
left a comment
Member
There was a problem hiding this comment.
btw maybe change acme by something else
Wauplin
approved these changes
Jun 11, 2026
Wauplin
left a comment
Contributor
There was a problem hiding this comment.
(release should be happening soon :) )
Member
|
merging due to release |
Member
|
ah sorry 🤦 saw slack message thought it was released |
Contributor
Author
|
No worries! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
follow-up PR after huggingface/huggingface_hub#4326, which added native oidc token-exchange (Trusted Publishers) support in
huggingface_hub. this PR updates the Trusted Publishers guide accordingly.huggingface_hub1.19.0 shipsNote
Low Risk
Documentation-only changes to the Trusted Publishers guide; no runtime or security logic in this repo.
Overview
Updates the Trusted Publishers guide (
docs/hub/trusted-publishers.md) so CI examples use thehfCLI (huggingface_hub>=1.19.0) for OIDC token exchange instead of manualcurl/jqcalls to/oauth/tokenandHF_TOKENin the environment.The GitHub Actions quick start now installs the CLI via the install script, sets
HF_OIDC_RESOURCEfor the target repo, and runshf uploaddirectly. New guidance covers multi-repo runs (per-stepHF_OIDC_RESOURCE) and an Other CI providers section with a GitLab example usingHF_OIDC_ID_TOKENplusHF_OIDC_RESOURCE.The gated repos flow is rewritten the same way: GitHub Actions uses
HF_OIDC_RESOURCEwithhf download; other providers pass the minted ID token viaHF_OIDC_ID_TOKEN.Reviewed by Cursor Bugbot for commit 3afd45b. Configure here.