Skip to content

fix(repos): Give git children the session credential - #6479

Merged
dan-petty merged 9 commits into
mainfrom
fix/6340-worktrees-add-has-no-credential-for
Nov 21, 2026
Merged

dan-petty merged 9 commits into
mainfrom
fix/6340-worktrees-add-has-no-credential-for

Conversation

@devops-cli-service

@devops-cli-service devops-cli-service Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

devops repos worktrees add <issue> -r <clone of a private repo> cannot read origin, so no agent can create a worktree there, and the run removes merged worktrees before that read fails. #6340 records the run of 2026-11-18 on the clone of a private repository and the behavior it expects: each git call of devops that reaches GitHub gets the credential of the session, and a run that cannot pass its preconditions changes nothing in the clone.

Closes #6340

Change: openspec/changes/archive/2026-11-19-6340-worktrees-add-has-no-credential-for/

@devops-cli-service devops-cli-service Bot added type/bug Type bug: the code does not do what it must scope/repos The devops repos commands and worktrees labels Nov 19, 2026
@devops-cli-service
devops-cli-service Bot force-pushed the fix/6340-worktrees-add-has-no-credential-for branch 3 times, most recently from 2dbb39e to c2d4983 Compare November 20, 2026 00:40
@devops-cli-service

devops-cli-service Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor Author

The steps of the job:

Stopped at checks. The stop report is on #6340: #6340 (comment).

  • tools: run_command 169, read_file 66, edit_file 37, grep 33, write_file 14, list_files 3, create_directory 2
  • scoped check pre-push: passed, 9 s
  • scoped check static: passed, 29 s
  • scoped check tests: failed, 50 s
  • scoped check pre-push: passed, 8 s
  • scoped check static: passed, 29 s
  • scoped check tests: passed, 48 s
  • scoped check strength: failed, 0 s
  • scoped check pre-push: passed, 8 s
  • scoped check static: passed, 30 s
  • scoped check tests: passed, 48 s
  • scoped check strength: passed, 0 s
  • scoped check tests: the changed files select more than 30 test modules, so only the changed test modules ran. The required checks of CI run the others
  • group 3: skipped, group 3: kind other
  • fail-to-pass of group 1: fails on the base commit. Tests that fail on the base commit: tests.core.test_subprocess_env_boundary::test_a_lookup_that_cannot_run_leaves_git_working_and_says_why[not-executable], tests.core.test_subprocess_env_boundary::test_gh_and_git_children_get_only_the_pinned_token, tests.core.test_subprocess_env_boundary::test_a_network_git_child_gets_the_credential_helper[ls-remote], tests.core.test_subprocess_env_boundary::test_git_runs_without_a_token_when_gh_has_no_login, tests.core.test_subprocess_env_boundary::test_a_network_git_child_gets_the_credential_helper[fetch], tests.core.test_subprocess_env_boundary::test_a_lookup_that_cannot_run_leaves_git_working_and_says_why[timeout], tests.core.test_process::test_the_root_of_the_file_system_as_the_current_folder_skips_no_candidate, tests.core.test_process::test_a_gh_child_gets_the_token_in_a_private_folder_that_goes_after_the_run[failure], tests.core.test_process::test_a_link_below_the_runtime_folder_does_not_move_the_token_folder, tests.core.test_process::test_a_gh_child_gets_the_token_in_a_private_folder_that_goes_after_the_run[success], tests.core.test_process::test_a_gh_child_gets_the_token_in_a_private_folder_that_goes_after_the_run[timeout], tests.core.test_process::test_terminate_process_group_guards_and_lifecycle.
  • fail-to-pass of group 2: fails on the base commit. Tests that fail on the base commit: tests.git.test_repos_worktrees_reclaim::test_a_failed_read_of_origin_removes_no_worktree.
  • verify of group 3: uv run devops ci --check --only docs exits 0.
\u2139 Quality gate root: /home/devops/.data/agent/worktrees/w-6340
\u2139 Executing CI quality gates concurrently...
  \u2713 pass [python_version] python version check (3.14+) (2\xb5s)
\u2713 All documentation files are up to date.
  \u2713 pass [docs] docs validation (11s)
            CI Summary            
 Check           Result  Duration 
 python_version  \u2713 pass  2\xb5s      
 docs            \u2713 pass  11s      
Total Elapsed: 11s (concurrent async execution)

Bytecode compiled 23345 files in 545ms
Bytecode compiled 23345 files in 592ms
  • verify of group 3: uv run devops ci docs exits 0.
\u2139 Quality gate root: /home/devops/.data/agent/worktrees/w-6340
\u2713 All documentation files are up to date.
Bytecode compiled 23345 files in 576ms
Bytecode compiled 23345 files in 560ms
  • verify of group 0: uv run devops ci test tests/core/test_subprocess_env_boundary.py exits 0.
/home/devops/.data/agent/worktrees/w-6340/.venv/lib/python3.14/site-packages/pytest_asyncio/plugin.py:300: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the "fixture" caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to "function" scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/home/devops/.data/agent/worktrees/w-6340/.venv/lib/python3.14/site-packages/pytest_asyncio/plugin.py:300: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the "fixture" caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to "function" scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/home/devops/.data/agent/worktrees/w-6340/.venv/lib/python3.14/site-packages/pytest_asyncio/plugin.py:300: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the "fixture" caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to "function" scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/home/devops/.data/agent/worktrees/w-6340/.venv/lib/python3.14/site-packages/pytest_asyncio/plugin.py:300: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the "fixture" caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to "function" scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/home/devops/.data/agent/worktrees/w-6340/.venv/lib/python3.14/site-packages/pytest_asyncio/plugin.py:300: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the "fixture" caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to "function" scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
  • verify of group 0: uv run devops ci test tests/git/test_repos_worktrees_reclaim.py exits 0.
================================================================================================================== test session starts ===================================================================================================================
platform linux -- Python 3.14.10, pytest-9.2.0, pluggy-1.7.0
rootdir: /home/devops/.data/agent/worktrees/w-6340
configfile: pyproject.toml
plugins: xdist-3.8.0, hypothesis-6.170.16, cov-7.1.0, asyncio-1.4.1.post1, platformdirs-4.14.7, time-machine-3.6.0, mock-3.17.0, anyio-4.16.0, syrupy-7.0.2, timeout-2.4.0
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
timeout: 600.0s
timeout method: signal
timeout func_only: False
collected 13 items

tests/git/test_repos_worktrees_reclaim.py .............                                                                                                                                                                                            [100%]

=================================================================================================================== 13 passed in 5.30s ===================================================================================================================
Bytecode compiled 23345 files in 575ms
Bytecode compiled 23345 files in 706ms
/home/devops/.data/agent/worktrees/w-6340/.venv/lib/python3.14/site-packages/pytest_asyncio/plugin.py:300: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the "fixture" caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to "function" scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
  • verify of group 0: uv run devops ci --check --only docs exits 0.
\u2139 Quality gate root: /home/devops/.data/agent/worktrees/w-6340
\u2139 Executing CI quality gates concurrently...
  \u2713 pass [python_version] python version check (3.14+) (3\xb5s)
\u2713 All documentation files are up to date.
  \u2713 pass [docs] docs validation (11s)
            CI Summary            
 Check           Result  Duration 
 python_version  \u2713 pass  3\xb5s      
 docs            \u2713 pass  11s      
Total Elapsed: 11s (concurrent async execution)

Bytecode compiled 23345 files in 611ms
Bytecode compiled 23345 files in 622ms
  • verify of group 0: uv run devops ci docs exits 0.
\u2139 Quality gate root: /home/devops/.data/agent/worktrees/w-6340
\u2713 All documentation files are up to date.
Bytecode compiled 23345 files in 529ms
Bytecode compiled 23345 files in 569ms
  • verify of group 0: uv run devops ci test tests/core/test_subprocess_env_boundary.py exits 0.
/home/devops/.data/agent/worktrees/w-6340/.venv/lib/python3.14/site-packages/pytest_asyncio/plugin.py:300: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the "fixture" caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to "function" scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/home/devops/.data/agent/worktrees/w-6340/.venv/lib/python3.14/site-packages/pytest_asyncio/plugin.py:300: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the "fixture" caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to "function" scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/home/devops/.data/agent/worktrees/w-6340/.venv/lib/python3.14/site-packages/pytest_asyncio/plugin.py:300: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the "fixture" caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to "function" scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/home/devops/.data/agent/worktrees/w-6340/.venv/lib/python3.14/site-packages/pytest_asyncio/plugin.py:300: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the "fixture" caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to "function" scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
/home/devops/.data/agent/worktrees/w-6340/.venv/lib/python3.14/site-packages/pytest_asyncio/plugin.py:300: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the "fixture" caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to "function" scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
  • verify of group 0: uv run devops ci test tests/git/test_repos_worktrees_reclaim.py exits 0.
================================================================================================================== test session starts ===================================================================================================================
platform linux -- Python 3.14.10, pytest-9.2.0, pluggy-1.7.0
rootdir: /home/devops/.data/agent/worktrees/w-6340
configfile: pyproject.toml
plugins: xdist-3.8.0, hypothesis-6.170.16, cov-7.1.0, asyncio-1.4.1.post1, platformdirs-4.14.7, time-machine-3.6.0, mock-3.17.0, anyio-4.16.0, syrupy-7.0.2, timeout-2.4.0
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
timeout: 600.0s
timeout method: signal
timeout func_only: False
collected 13 items

tests/git/test_repos_worktrees_reclaim.py .............                                                                                                                                                                                            [100%]

=================================================================================================================== 13 passed in 5.41s ===================================================================================================================
Bytecode compiled 23345 files in 579ms
Bytecode compiled 23345 files in 600ms
/home/devops/.data/agent/worktrees/w-6340/.venv/lib/python3.14/site-packages/pytest_asyncio/plugin.py:300: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the "fixture" caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to "function" scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
  • verify of group 0: uv run devops ci --check --only docs exits 0.
\u2139 Quality gate root: /home/devops/.data/agent/worktrees/w-6340
\u2139 Executing CI quality gates concurrently...
  \u2713 pass [python_version] python version check (3.14+) (2\xb5s)
\u2713 All documentation files are up to date.
  \u2713 pass [docs] docs validation (11s)
            CI Summary            
 Check           Result  Duration 
 python_version  \u2713 pass  2\xb5s      
 docs            \u2713 pass  11s      
Total Elapsed: 11s (concurrent async execution)

Bytecode compiled 23345 files in 584ms
Bytecode compiled 23345 files in 585ms
  • verify of group 0: uv run devops ci docs exits 0.
\u2139 Quality gate root: /home/devops/.data/agent/worktrees/w-6340
\u2713 All documentation files are up to date.
Bytecode compiled 23345 files in 554ms
Bytecode compiled 23345 files in 557ms

@dan-petty
dan-petty force-pushed the fix/6340-worktrees-add-has-no-credential-for branch from c2d4983 to 7f497c6 Compare November 21, 2026 13:33
@dan-petty
dan-petty marked this pull request as ready for review November 21, 2026 13:49
@dan-petty
dan-petty self-requested a review as a code owner November 21, 2026 13:49
@dan-petty
dan-petty merged commit 7f3886e into main Nov 21, 2026
29 checks passed
@dan-petty
dan-petty deleted the fix/6340-worktrees-add-has-no-credential-for branch November 21, 2026 13:51
dan-petty pushed a commit that referenced this pull request Nov 21, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.188.0](v0.187.2...v0.188.0)
(2026-11-21)


### Features

* **roadmap:** Run review scanners in the runner pod
([#6166](#6166))
([9f164f7](9f164f7))


### Bug Fixes

* **repos:** Give git children the session credential
([#6479](#6479))
([7f3886e](7f3886e))
* **roadmap:** an alternatives block names no blocker of an item
([#6624](#6624))
([5eac8e5](5eac8e5))
* **roadmap:** Refuse repair text in stage feasibility lines
([#6323](#6323))
([c105f59](c105f59))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
dan-petty added a commit that referenced this pull request Nov 21, 2026
Each child of a person now gets the `GIT_CONFIG_COUNT`,
`GIT_CONFIG_KEY_<n>` and `GIT_CONFIG_VALUE_<n>` of the environment, as a
shell gives them, so git reads the credential helper that the
devcontainer sets. A process that acts as the GitHub App gives these
keys to no child: its image sets the helper in `/etc/gitconfig`, and
until #3700 the shell of the agent can start a process with keys of its
own. A caller still cannot set them.

Delete the credential `-c` values that the process runner inserted into
each network git call (#6479), and the per-call values of `devops infra`
and `deploy-stack`. The implement job keeps its values, because its
calls read no config file. A test runs `devops repos worktrees add`
against a loopback server: the read of `origin` gets the credential of
the configured helper, with no `-c` value (#6340).

Closes #6653

Change:
`openspec/changes/archive/2026-11-21-6653-git-config-passthrough/`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/repos The devops repos commands and worktrees type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(repos): worktrees add has no credential for a private repo

1 participant