{"version":"2.1.6","anchor":"git-token-injection-for-private-repository-cloning","canonical_anchor":"git-token-injection-for-private-repository-cloning","heading":"Git Token Injection for Private Repository Cloning","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.6\/e\/git-token-injection-for-private-repository-cloning","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.6","markdown":"### Git Token Injection for Private Repository Cloning\n\n**What**\n\nClaude Code now automatically injects authentication tokens when cloning HTTPS repositories, supporting GitHub, GitLab, and Bitbucket.\n\nUsage: Set the appropriate environment variable and clone private repositories seamlessly:\n\n`export GITHUB_TOKEN=your_token # Or: GH_TOKEN, GITLAB_TOKEN, GL_TOKEN, BITBUCKET_TOKEN` **Details** - Automatically detects authentication failures and retries with token injection - Supports `GITHUB_TOKEN`\/`GH_TOKEN` for github.com - Supports `GITLAB_TOKEN`\/`GL_TOKEN` for gitlab.com and GitLab self-hosted instances - Supports `BITBUCKET_TOKEN` for bitbucket.org - Tokens in error messages are automatically redacted for security - Preserves `SSH_AUTH_SOCK` for SSH key agent forwarding **Evidence** `K55()` at line 299739 (token injection logic, contains `\"Injecting GitHub token into clone URL\"`)"}