Skip to content

Commit bb3b8c4

Browse files
authored
Merge pull request #24652 from dvdksn/dvdksn/signed-commits-troubleshooting
Add signed Git commits troubleshooting for sandboxes
2 parents 68cf722 + 257124b commit bb3b8c4

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

content/manuals/ai/sandboxes/troubleshooting.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,28 @@ $ git worktree remove .sbx/<sandbox-name>-worktrees/<branch-name>
9393
$ git branch -D <branch-name>
9494
```
9595

96+
## Signed Git commits
97+
98+
Agents inside a sandbox can't sign commits because signing keys (GPG, SSH)
99+
aren't available in the sandbox environment. Commits created by an agent are
100+
unsigned.
101+
102+
If your repository or organization requires signed commits, use one of these
103+
workarounds:
104+
105+
- **Commit outside the sandbox.** Let the agent make changes without
106+
committing, then commit and sign from your host terminal.
107+
108+
- **Sign after the fact.** Let the agent commit inside the sandbox, then
109+
re-sign the commits on your host:
110+
111+
```console
112+
$ git rebase --exec 'git commit --amend --no-edit -S' origin/main
113+
```
114+
115+
This replays each commit on the branch and re-signs it with your local
116+
signing key.
117+
96118
## Clock drift after sleep/wake
97119

98120
If your laptop sleeps and wakes while a sandbox is running, the VM clock can

0 commit comments

Comments
 (0)