Skip to content

fix: prevent GITHUB_TOKEN from overriding LGTM app token in refresh-library CI#95

Draft
souravbiswassanto wants to merge 3 commits into
masterfrom
fix-refresh-library-ci
Draft

fix: prevent GITHUB_TOKEN from overriding LGTM app token in refresh-library CI#95
souravbiswassanto wants to merge 3 commits into
masterfrom
fix-refresh-library-ci

Conversation

@souravbiswassanto

Copy link
Copy Markdown
Member

Summary

  • Add persist-credentials: false to the actions/checkout step so the GITHUB_TOKEN credential helper (extraheader) is not installed
  • Remove redundant git remote set-url line — url.insteadOf with the LGTM app token is sufficient

Root Cause

actions/checkout with the default persist-credentials: true installs an http.https://github.com/.extraheader that injects the GITHUB_TOKEN as an HTTP Authorization header. This header takes precedence over URL-embedded credentials set via url.insteadOf, causing git push to authenticate as github-actions[bot] (which lacks write permission) instead of the intended LGTM app token.

Test plan

  • Trigger the refresh-library workflow manually via workflow_dispatch and verify the "Update repo" step pushes successfully

🤖 Generated with Claude Code

…ibrary CI

Signed-off-by: souravbiswassanto <saurov@appscode.com>
…licts

Signed-off-by: souravbiswassanto <saurov@appscode.com>
Signed-off-by: souravbiswassanto <saurov@appscode.com>
@souravbiswassanto souravbiswassanto marked this pull request as draft June 12, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant