Remove redundant git fetch that breaks private-repo deploys - #157
Merged
Conversation
The action ran a bare `git fetch origin $branch` in the Get DBT Deploy Options and Get Deploy Type steps. Since the checkout step sets `persist-credentials: false` (#146), no auth token is left in the git config, so on a private repo that fetch fails with 'could not read Username for https://github.com' and aborts the deploy. The fetch is redundant: the checkout already uses `fetch-depth: 0`, so the full history (including `github.event.before`) is present locally, and the subsequent `git diff`/`git cat-file` are local operations. Public repos never hit this because they fetch anonymously. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GeJw7cWHVQdoccfmfrUn4B
neel-astro
approved these changes
Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
what
removes the two bare
git fetch origin $branchcalls in the "Get DBT Deploy Options" and "Get Deploy Type" stepswhy
the checkout step sets
persist-credentials: false(#146), so no auth token is left in the git config after checkout. on a private repo the action's owngit fetch origin $branchthen fails withfatal: could not read Username for 'https://github.com'and aborts the deploy. public repos never hit it because they fetch anonymouslythe fetch is redundant anyway: checkout already runs with
fetch-depth: 0, so the full history (includinggithub.event.before) is present locally, and thegit diff/git cat-filethat follow are local operations. the branch tip the fetch would pull isgithub.event.after, which is already checked outtesting
reproduced the failure on a private repo (deploy died at
git fetch originwithcould not read Username), then confirmed this branch runs clean on the same private repo:git diff before afterresolves against the local history and a full image + dags deploy completes on stage, no fetch errornote
this is a latent regression - the
persist-credentials: falsechange is onmainbut not in any release yet (latest is v0.13.0, which predates it), so no released user is affected. worth landing before the next release🤖 Generated with Claude Code
https://claude.ai/code/session_01GeJw7cWHVQdoccfmfrUn4B