Skip to content

bot-token: set the git identity with GIT_AUTHOR_*/GIT_COMMITTER_* so a submodule checkout after it does not send Authorization twice #121

Closed

Description

@brunogbv

What

bot-token sets the bot's git identity by exporting GIT_CONFIG_GLOBAL=$RUNNER_TEMP/bot-token.gitconfig. A later actions/checkout with submodules: true writes its auth include.path "globally" under a temporary HOME, which it then discards; GIT_CONFIG_GLOBAL outranks HOME, so the include lands in bot-token.gitconfig and stays for the job. Each submodule also gets checkout's own includeIf to the same credentials file, so the next submodule fetch sends Authorization twice and GitHub answers 400 Duplicate header: "Authorization".

Seen live on 2026-10-14: marola's pointer-sync.yml (bot-token v0.11.0, then checkout with submodules) failed at fatal: Unable to fetch in submodule path 'marola-site': https://github.com/marola-dev/marola/actions/runs/38638524656. The log shows git config --global include.path /home/runner/work/_temp/git-credentials-….config written while GIT_CONFIG_GLOBAL pointed at bot-token.gitconfig. Reproduced locally: with GIT_CONFIG_GLOBAL=f HOME=tmp, git config --global include.path x writes to f and leaves tmp empty. Submodule pointers do not move until this is fixed.

Fix: export GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL to GITHUB_ENV instead of GIT_CONFIG_GLOBAL. No git config file changes, so checkout's HOME override works again, and nothing outlives the job on a self-hosted runner. Keep the name/email outputs. Update docs/4-reference_workflows.md (the GIT_CONFIG_GLOBAL sentence) and the CHANGELOG (v0.11.1).

Acceptance criteria

  • bot-token exports the four GIT_AUTHOR_*/GIT_COMMITTER_* variables and no longer sets GIT_CONFIG_GLOBAL
  • bot-token-test.yml's mints-scoped job checks the identity through a real commit's author and committer (not git config --global)
  • a new bot-token-test.yml job mints a token, then runs actions/checkout with submodules: true on a repo that has submodules, then fetches every submodule: red on v0.11.0's action, green after
  • just quality green; CHANGELOG ## v0.11.1 entry
  • after v0.11.1 and marola's bump: a pointer-sync.yml run opens the sync PR as marola-pr-bot (run link on MIP-0086 task 4: pointer-sync opens as marola-pr-bot, merges as marola-merge-bot, honours hold and AUTO_MERGE marola#766)

Named test

.github/workflows/bot-token-test.yml (the new submodule job and mints-scoped); the live pointer-sync.yml run above.


Found while proving MIP-0086 row 4 (marola-dev/marola#766). Parent: marola-dev/marola#787.

Activity

  1. added
    area/dev-toolingClaude Code / OpenCode / agentic-tooling dev workflow, not the product
    layer/infra.github/, scripts/, justfile, flake.nix, .githooks/, .claude/
    on Oct 14, 2026
  2. self-assigned this
    on Oct 14, 2026
  3. added
    size/SUnder ~100 changed lines
    agent-readyPasses the five-rule Definition of Ready — an agent may begin work on it (MIP-0063 §5.4)
    and removed
    agent-readyPasses the five-rule Definition of Ready — an agent may begin work on it (MIP-0063 §5.4)
    on Oct 14, 2026
  4. moved this from Backlog to In progress in Marolaon Oct 14, 2026
  5. moved this from In progress to Done in Marolaon Oct 14, 2026
  6. brunogbv commented on Oct 15, 2026

    @brunogbv
    CollaboratorAuthor

    Live proof: bot-token-test on #122, checkout-submodules and mints-scoped green; after v0.11.1 reached marola, pointer-sync.yml checked out every submodule and opened #831 as marola-pr-bot: https://github.com/marola-dev/marola/actions/runs/38648267678

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/dev-toolingClaude Code / OpenCode / agentic-tooling dev workflow, not the productlayer/infra.github/, scripts/, justfile, flake.nix, .githooks/, .claude/size/SUnder ~100 changed lines

Type

No type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions