You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RepoWorkspace: the GitHub secret becomes a custom bearer entry, so git cannot clone #835
RepoWorkspace.get_secrets returns SandboxSecret(name="github", secret_id=..., resource=repo, host=Github.host), where Github.host = "github.com". SandboxIdentity (sandbox/models.py) turns any ref with a host into a custom entry: host, auth_variable="GITHUB", auth_header="Authorization", auth_prefix="Bearer ".
Drukbox's host_secrets.catalog.service() returns a custom Service for every entry with "host", and so never the catalog github service (with GH_TOKEN, api.github.com, uploads.github.com, and Basic x-access-token on github.com).
Results:
docker-sbx: SbxInjection.put_secret calls sbx secret set-custom and not the native github secret. git's smart HTTP gets no Basic credential; git clone fails with fatal: could not read Username for 'https://github.com'. gh answers 401.
proxy providers: the box gets GITHUB, not GH_TOKEN, and get_github() does not
configure git, because GH_TOKEN is not in the env.
The SandboxSecret docstring says "Drukbox knows github.com: that entry is its GitHub
service", which is not what the code does.
Reproduction (docker-sbx)
In a sandbox on the default template, with an installation token minted by Github.issue_token(repo):
sbx secret set github --sandbox X --command 'cat <file>' → git clone works, gh works.
sbx secret set-custom --sandbox X --host github.com --env GITHUB --placeholder P --command 'cat <file>'
(what Drukbox does for Druks' entry) → git clone asks for a username, gh api user 401.
Possible fixes
Druks: RepoWorkspace.get_secrets sends no host for a service that Drukbox's
catalog knows (github), so the entry is the catalog service.
Drukbox: catalog.service() resolves a catalog name before the custom branch, or SbxInjection treats a custom entry for github.com as the native secret.
A test that pins the GitHub entry as Drukbox's catalog service would catch a regression.
This is fixed upstream in czpython/drukbox#63, merged on 1 October 2026 (commit 6aec473f095b9210a03f20e5e1d762fe00e62133).
Drukbox resolves an entry with host="github.com" to its built-in GitHub service, regardless of the entry name. This supplies GH_TOKEN, bearer authentication for the API and upload hosts, and Basic authentication for git. The Docker Sandboxes provider also selects the native github secret from that resolved service.
Keep host in Druks. This mapping also supports service names such as github_reviewer.
Update Drukbox to an image that contains this commit, then retry the clone and gh command in a new sandbox. If the failure persists, reopen this issue with the Drukbox image tag or digest, provider, and reproduction.
Activity
czpython commentedon Oct 6, 2026
This is fixed upstream in czpython/drukbox#63, merged on 1 October 2026 (commit
6aec473f095b9210a03f20e5e1d762fe00e62133).Drukbox resolves an entry with
host="github.com"to its built-in GitHub service, regardless of the entry name. This suppliesGH_TOKEN, bearer authentication for the API and upload hosts, and Basic authentication for git. The Docker Sandboxes provider also selects the nativegithubsecret from that resolved service.Keep
hostin Druks. This mapping also supports service names such asgithub_reviewer.Update Drukbox to an image that contains this commit, then retry the clone and
ghcommand in a new sandbox. If the failure persists, reopen this issue with the Drukbox image tag or digest, provider, and reproduction.Closing as fixed upstream.