Claude Code on the web

Claude Code on the web: private submodule credential access and git submodule init mechanism

2026-03-29 · agentic-ai tools-infrastructure security-risk · medium · source → · wiki →
key claims
  1. Claude Code on the web clones the selected repository but does not run `git submodule update --init` automatically; submodule directories exist in the working tree but are empty, confirmed by a Reddit community report and two separate GitHub issues against the `anthropics/claude-code` repository
  2. The GitHub proxy's scoped credential is intentionally limited to the selected repository for security reasons; private submodules in other repositories are inaccessible through this credential even when the Claude.ai GitHub App has been granted access to those repositories at the organisation level
  3. Environment variables configured in the Claude.ai UI are available as standard Bash variables during the setup script execution, making it possible to store a PAT there and reference it in the setup script as `${SKILLS_PAT}` or equivalent
  4. The recommended workaround for private submodule access uses `git config --global url."https://${SKILLS_PAT}@github.com/".insteadOf "https://github.com/"` in the setup script, followed by `git submodule update --init .github/skills`, embedding the PAT in the URL rather than an HTTP header to reduce the risk of the proxy stripping the credential
  5. SSH key injection for private submodule access is not a supported mechanism in Claude Code web; the GitHub proxy operates exclusively over HTTPS, and no SSH key configuration path is documented or reported as functional by community users
  6. GitHub repository secrets (managed via GitHub Settings and referenced in workflows as `${{ secrets.NAME }}`) are not available to the Claude Code web setup script, because the setup script runs on an Anthropic-managed VM outside the GitHub Actions execution context
  7. This repository's `.gitmodules` file already uses an HTTPS URL (`https://github.com/davidamitchell/Skills.git`) rather than an SSH URL, which simplifies the PAT workaround by eliminating the need for SSH-to-HTTPS URL rewriting in the setup script
  8. A fine-grained PAT scoped to `davidamitchell/Skills` with `contents:read` permission only reduces the blast radius if the token is exposed, compared to a classic token with broad `repo` scope

Research Question

Does Claude Code on the web automatically initialise git submodules when cloning a repository, and if so, can it access private submodules (such as davidamitchell/Skills referenced at .github/skills/)? If not, what is the correct mechanism to grant it access via the User Interface (UI)-configured setup script?

Findings

Executive Summary

Claude Code on the web does not automatically initialise git submodules when cloning a repository, and the built-in GitHub proxy credential covers only the selected repository, leaving private submodule directories empty by default. The workaround is to store a fine-grained PAT with read access to the submodule repository in the Claude.ai UI environment variable configuration, then configure git URL credential injection and run git submodule update --init in the Bash setup script. This approach is confirmed by community practice and CI/CD patterns but has not been tested end-to-end against the Claude Code web proxy specifically. SSH key injection is not supported. GitHub repository secrets are not available to the Claude Code web setup script, so the PAT must be stored in Claude.ai's own credential store.

Key Findings

  1. Claude Code on the web clones the selected repository but does not run git submodule update --init automatically; submodule directories exist in the working tree but are empty, confirmed by a Reddit community report and two separate GitHub issues against the anthropics/claude-code repository. (high confidence)

  2. The GitHub proxy's scoped credential is intentionally limited to the selected repository for security reasons; private submodules in other repositories are inaccessible through this credential even when the Claude.ai GitHub App has been granted access to those repositories at the organisation level. (high confidence)

  3. Environment variables configured in the Claude.ai UI are available as standard Bash variables during the setup script execution, making it possible to store a PAT there and reference it in the setup script as ${SKILLS_PAT} or equivalent. (high confidence)

  4. The recommended workaround for private submodule access uses git config --global url."${SKILLS_PAT}@github.com "github.com in the setup script, followed by git submodule update --init .github/skills, embedding the PAT in the URL rather than an HTTP header to reduce the risk of the proxy stripping the credential. (medium confidence)

  5. SSH key injection for private submodule access is not a supported mechanism in Claude Code web; the GitHub proxy operates exclusively over HTTPS, and no SSH key configuration path is documented or reported as functional by community users. (high confidence)

  6. GitHub repository secrets (managed via GitHub Settings and referenced in workflows as ${{ secrets.NAME }}) are not available to the Claude Code web setup script, because the setup script runs on an Anthropic-managed VM outside the GitHub Actions execution context. (medium confidence)

  7. This repository's .gitmodules file already uses an HTTPS URL (github.com) rather than an SSH URL, which simplifies the PAT workaround by eliminating the need for SSH-to-HTTPS URL rewriting in the setup script. (high confidence)

  8. A fine-grained PAT scoped to davidamitchell/Skills with contents:read permission only reduces the blast radius if the token is exposed, compared to a classic token with broad repo scope. [inference] (medium confidence)

  9. Whether the Claude Code web GitHub proxy allows HTTPS requests with an embedded PAT (i.e., TOKEN@github.com) to pass through to non-selected repositories has not been confirmed by Anthropic documentation or a verified community test; this is the primary remaining uncertainty for the workaround. (low confidence)

  10. GitHub issue #24400, requesting that the Claude Code web proxy natively support all repositories the GitHub App has access to, was opened and closed in a single day in February 2026 with no documented resolution; the closure appears to be automated rather than a confirmed implementation. (medium confidence)

Assumptions

Analysis

Evidence from three independent sources (Reddit community, GitHub issues #24400 and #17293) converges on the same behaviour: submodules are not initialised on clone. This is consistent with the official documentation's description of the GitHub proxy covering only the selected repository.

The community workaround (PAT + URL modification) and the CI/CD-pattern alternative (url.insteadOf) both rely on embedding credentials in the HTTPS URL rather than using a standard credential helper. [inference] The url.insteadOf approach avoids modifying a tracked file (.gitmodules) and follows established CI/CD credential injection convention. The critical uncertainty is whether the Claude Code web proxy passes through embedded-PAT URLs to non-selected repositories. This cannot be resolved without a live test.

The npm proxy stripping evidence (issue #11078) establishes that the proxy does modify outbound requests, but git and npm use different authentication flows: npm uses a separate Authorization header, while git with HTTPS embeds credentials in the URL or uses a credential helper that responds to a challenge. The URL embedding path may not be intercepted by the proxy in the same way.

[inference] The fine-grained contents:read PAT scope for davidamitchell/Skills minimises the permission surface. The COPILOT_GITHUB_TOKEN already available as a repository credential may have sufficient scope, but a dedicated minimal-permission token isolates the Claude Code web credential from broader repository operations.

Risks, Gaps, and Uncertainties

Open Questions

Output

sources

Connected items

Loading…

View full knowledge graph →