Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
scope/releaseThe release-please workflow, the changelog and the published artifactssource/agentFiled by an agenttype/bugType bug: the code does not do what it must
Description
Problem
#1124 runs the release command's remote git calls (the release-branch fetch, the cut push and the tag push, through _run_remote_git_or_exit in src/devops_cli/commands/release.py) with the person's environment, so their configured credential helper answers. That environment also carries git's own location variables. An exported GIT_DIR, GIT_WORK_TREE, GIT_INDEX_FILE or GIT_NAMESPACE points those calls at another repository, while the cut's other git calls, which run in the sanitized environment, use --root.
- Verified during fix(release): release pushes run git with the person's environment, so the configured credential helper answers instead of "could not read Username", and a failed push stops
release prbefore it opens a PR #1124's review (2026-10-08): withGIT_DIR=<B>/.gitexported,git remote get-url originrun for repository A returned B's URL in the inherited environment and A's in the sanitized one. - git exports
GIT_DIRto the hooks it runs in a linked worktree, and people who keep dotfiles in a bare repository often export it.
Acceptance criteria
-
build_subprocess_env(src/devops_cli/core/process.py) can drop git's own location variables, the listgit rev-parse --local-env-varsprints, from an inherited environment. The release command's remote git calls use it, soGIT_DIRand its siblings never redirect them, while the credential helper andSSH_AUTH_SOCKstill reach git. - A real-git test exports
GIT_DIRpointing at a second repository and shows the release push and fetch still act on the--rootrepository. - Tests are offline (local bare remotes), each call phase stays under 1 s, and
uv run devops cipasses;changelog.d/<n>.mdrecords the change.
Strategic alignment
- Follow-up required by fix(release): release pushes run git with the person's environment, so the configured credential helper answers instead of "could not read Username", and a failed push stops
release prbefore it opens a PR #1124's review (it needs acore/process.pychange fix(release): release pushes run git with the person's environment, so the configured credential helper answers instead of "could not read Username", and a failed push stopsrelease prbefore it opens a PR #1124 excluded). Related: fix(release): release pushes run git with the person's environment, so the configured credential helper answers instead of "could not read Username", and a failed push stopsrelease prbefore it opens a PR #1124, refactor(github): one github session per identity owning token, quota and transport #767.
Found on 2026-10-08 while delivering #1124. Filed directly with no priority; the roadmap service's intake sets Priority, Value and Effort.
Metadata
Metadata
Assignees
Labels
scope/releaseThe release-please workflow, the changelog and the published artifactssource/agentFiled by an agenttype/bugType bug: the code does not do what it must
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty-bot commentedon Oct 8, 2026
Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.
It can push or fetch against the wrong repository, but only when the user has a git location variable exported, a non-default but realistic condition.Affects users with bare-repo dotfiles or linked worktrees who export GIT_DIR, and the failure mode (wrong-repo push) is severe when it occurs.Requires extending build_subprocess_env to strip the list from 'git rev-parse --local-env-vars', wiring it into the release remote-git calls, and adding a real-git test with a second bare remote.dan-petty commentedon Oct 22, 2026
Superseded by ADR 0012 (docs/adr/0012-releases-are-derived-by-release-please-from-trunk-and-milestones-are-planning-buckets.md). The cut, the fragments or the hand-built release pull request that this issue concerns are deleted by the new release model.