Skip to content

Remove redundant git fetch that breaks private-repo deploys - #157

Merged
jlaneve merged 1 commit into
mainfrom
persist-credentials-fetch
Jul 15, 2026
Merged

Remove redundant git fetch that breaks private-repo deploys#157
jlaneve merged 1 commit into
mainfrom
persist-credentials-fetch

Conversation

@jlaneve

@jlaneve jlaneve commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

what

removes the two bare git fetch origin $branch calls in the "Get DBT Deploy Options" and "Get Deploy Type" steps

why

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 own git fetch origin $branch then fails with fatal: could not read Username for 'https://github.com' and aborts the deploy. public repos never hit it because they fetch anonymously

the fetch is redundant anyway: checkout already runs with fetch-depth: 0, so the full history (including github.event.before) is present locally, and the git diff / git cat-file that follow are local operations. the branch tip the fetch would pull is github.event.after, which is already checked out

testing

reproduced the failure on a private repo (deploy died at git fetch origin with could not read Username), then confirmed this branch runs clean on the same private repo: git diff before after resolves against the local history and a full image + dags deploy completes on stage, no fetch error

note

this is a latent regression - the persist-credentials: false change is on main but 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

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
@jlaneve
jlaneve requested a review from a team as a code owner July 15, 2026 12:53
@jlaneve
jlaneve merged commit 6d1feea into main Jul 15, 2026
2 of 3 checks passed
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.

2 participants