Rename glab kit to gitlab, add gitlab-ssh for git-over-SSH - #271
Open
johnfeeney-docker wants to merge 1 commit into
Open
Rename glab kit to gitlab, add gitlab-ssh for git-over-SSH#271johnfeeney-docker wants to merge 1 commit into
johnfeeney-docker wants to merge 1 commit into
Conversation
The glab kit's Bearer-auth injection only covers glab/REST API calls; git-over-HTTPS push/pull was never wired up. Tried adding a second apiKey.inject rule with scheme: basic on the same gitlab.com domain (GitLab accepts oauth2:<PAT> as Basic auth) and confirmed via a live sandbox that it does not work: the proxy does not disambiguate two inject rules on one domain by which auth scheme the client sent, so the Basic-auth request is never rewritten and GitLab rejects the literal sentinel. Unlike GitHub (api.github.com vs github.com), GitLab serves both the API and git smart-HTTP from the same gitlab.com host, so there's no domain split to fall back on — this is a proxy-level gap, not something fixable from the kit side. Adds gitlab-ssh, mirroring the existing github-ssh kit: pins GitLab's published SSH host keys into known_hosts so git clone/push/pull over SSH work without an interactive host-key prompt (verified end-to-end against a real sandbox: host-key verification now passes, auth fails cleanly on publickey rather than on host trust). Updates glab's README/agentInstructions to steer git operations at SSH remotes. Renames the glab directory/kit name to gitlab for clarity. This kit was already merged and published as docker.io/sbx/glab-kit:latest, so this is a breaking rename for that specific tag; flagging in the PR for maintainers to decide on an alias/redirect if needed. Co-Authored-By: Claude Signed-off-by: John Feeney <john.feeney@docker.com>
johnfeeney-docker
force-pushed
the
add-glab-kit
branch
from
September 8, 2026 09:27
679c67a to
b540087
Compare
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.
Summary
glabmixin togitlab(directory +name:field) for clarity.gitlab-sshmixin, mirroringgithub-ssh: pins GitLab.com's published SSH host keys intoknown_hostssogit clone/push/pullover SSH work without an interactive host-key prompt.gitlabkit's README/agentInstructionsto steer git operations at SSH remotes and point atgitlab-ssh.Why
The
glabkit only wires up Bearer auth forglab/REST API traffic togitlab.com. Git-over-HTTPS push/pull was never covered, and I tried closing that gap by adding a secondcredentials[].apiKey.injectrule withscheme: basic(GitLab acceptsoauth2:<PAT>as HTTP Basic) on the samegitlab.comdomain.I tested this against a live sandbox and confirmed it does not work: the proxy does not disambiguate two inject rules on one domain by which auth scheme the client already sent, so the Basic-auth git request is never rewritten and GitLab rejects the literal sentinel value with
HTTP Basic: Access denied. Bearer auth forglab apicontinued to work fine throughout.GitHub avoids this exact collision because its Bearer traffic goes to
api.github.comwhile git-over-HTTPS goes togithub.com— different domains, no collision. GitLab serves both the API and git smart-HTTP from the singlegitlab.comhost, so there's no domain split to fall back on. This looks like a proxy-level gap (no way to disambiguate same-domain inject rules by scheme), not something fixable from the kit side — I'll file a separate feature request for that.Given HTTPS push isn't fixable here,
gitlab-sshmakes the documented workaround (SSH remotes via the forwarded host SSH agent) actually usable non-interactively, the same waygithub-sshdoes for GitHub.Breaking change note for maintainers
glabwas merged in #225 and is already published asdocker.io/sbx/glab-kit:latest. Renaming it togitlabmeans that published tag goes stale rather than updating — happy to add a redirect/alias if there's a preferred mechanism, or to keep the old name if you'd rather avoid the break. Given it's only been live ~2 weeks I judged the clearer name worth it, but deferring to you here.Test plan
sbx kit validate— both kitsscripts/test-kit.sh) — both kits, passingdeny-all(scripts/test-kit-e2e.sh) — both kits, passingglab auth status/glab api user— Bearer auth unaffected by the renameHTTP Basic: Access denied), documenting the proxy limitationgitlab-ssh:known_hostspopulated at create;ssh -T git@gitlab.compasses host-key verification (fails cleanly onpublickey, not on host trust)git@gitlab.com:...succeeded🤖 Generated with Claude Code