From a613a344de3a33adc04a24fcee877de506d804b7 Mon Sep 17 00:00:00 2001 From: Ross Golder Date: Thu, 30 Jul 2026 00:29:29 +0000 Subject: [PATCH] fix(test): disable gpg signing in worktree test repo (#1072) Fixes #1071 `TestRepoFromPath_Worktree` creates a throwaway temp repo and commits to it. On machines with `commit.gpgsign=true` in global git config, the commit fails with `No secret key`. Override the global setting by setting `commit.gpgsign=false` in the temp repo's local config so the test is environment-independent. Reviewed-on: https://gitea.com/gitea/tea/pulls/1072 Reviewed-by: Lunny Xiao Co-authored-by: Ross Golder --- tests/integration/git_repo_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration/git_repo_test.go b/tests/integration/git_repo_test.go index 47b0b6e3..5d834cb8 100644 --- a/tests/integration/git_repo_test.go +++ b/tests/integration/git_repo_test.go @@ -29,6 +29,8 @@ func TestRepoFromPath_Worktree(t *testing.T) { assert.NoError(t, cmd.Run()) cmd = exec.Command("git", "-C", mainRepoPath, "config", "user.name", "Test User") assert.NoError(t, cmd.Run()) + cmd = exec.Command("git", "-C", mainRepoPath, "config", "commit.gpgsign", "false") + assert.NoError(t, cmd.Run()) cmd = exec.Command("git", "-C", mainRepoPath, "remote", "add", "origin", "https://gitea.com/owner/repo.git") assert.NoError(t, cmd.Run())