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
bug: gh repo clone fails with default github provider — POST git-upload-pack denied #1769
Loaded skill: openshell-cli. Investigated the default GitHub provider profile at providers/github.yaml and the access preset expansion in crates/openshell-sandbox/src/l7/mod.rs.
Finding: The github.com:443 endpoint in the default GitHub provider uses access: read-only, which expands to allow only GET, HEAD, OPTIONS. Git's smart HTTP protocol requires POST to */git-upload-pack for clone and fetch operations. This POST is denied by the L7 proxy, causing gh repo clone and git clone https://... to fail.
Root cause confirmed by reading expand_access_presets() at l7/mod.rs:1066-1142 — read-only for REST protocol generates rules for GET/HEAD/OPTIONS only.
Description
Actual behavior:gh repo clone <repo> inside a sandbox with the default GitHub provider fails. The sandbox logs show a deny for POST github.com:443/.../git-upload-pack.
Expected behavior: Clone and fetch should succeed with the default GitHub provider since these are read-only Git operations.
Reproduction Steps
openshell sandbox create -- claude (or any agent with a GitHub provider)
Inside the sandbox: gh repo clone NVIDIA/OpenShell
Observe the clone fails
openshell logs <sandbox> --tail --source sandbox shows POST denied on github.com:443
Replace the access: read-only preset on the github.com endpoint with explicit L7 rules that add POST **/git-upload-pack alongside the standard read-only methods. This allows clone/fetch while keeping push (git-receive-pack) blocked.
The built-in GitHub provider promises clone/fetch access but its current L7 policy necessarily denies Git smart HTTP's upload-pack POST. The defect remains on current main; no duplicate or open fix PR was found.
Investigation
providers/github.yaml configures the Git transport endpoint with REST access: read-only. The L7 preset expands that to GET, HEAD, and OPTIONS only, while a clone/fetch performs GET on info/refs followed by POST to /<owner>/<repo>.git/git-upload-pack. The second request is therefore denied as reported. The global REST preset is behaving correctly; the mismatch is in this provider-specific policy.
Recommendation
Replace only the github.com endpoint's preset with explicit rules that retain GET/HEAD/OPTIONS and narrowly allow POST to the tested git-upload-pack path shape. Keep git-receive-pack and unrelated POST requests denied so push/write remains opt-in. Add policy-decision tests and a GitHub-provider-only clone/fetch E2E test so broader overlapping profiles cannot mask regressions.
Activity
TaylorMutch commentedon Jul 13, 2026
test(providers): strengthen git-transport regression and add clone e2e
test(providers): isolate providers_v2 mutation in clone e2e
test(providers): serialize providers_v2 mutation with a suite-wide guard
fix(providers): allow git clone/fetch via default GitHub provider (NV…