mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
Automatically detect GITHUB_TOKEN, GITLAB_TOKEN, BITBUCKET_TOKEN, or SKILLSHARE_GIT_TOKEN and inject credentials via transient GIT_CONFIG_* env vars during clone and pull. Tokens are never persisted to disk. Key changes: - Platform detection (GitHub/GitLab/Bitbucket) with per-platform username conventions (x-access-token, oauth2, x-token-auth) - GIT_CONFIG_COUNT safe append — reads existing count to avoid overriding CI pipeline git config entries - Token-aware error messages: "no token" shows 3 options (SSH, env var, credential helper); "token rejected" suggests checking permissions and expiry - sanitizeTokens redacts all credential values (including BITBUCKET_USERNAME) from stderr before surfacing errors - gitPull also injects auth via getRemoteURL(), fixing the previous limitation where update failed after HTTPS+token install