{"record":{"id":"3c696a24bcc57e3a","repo":"jesseduffield/lazygit","slug":"feature-not-available-for-users-using-gpg-if-you","errorCode":null,"errorMessage":"Feature not available for users using GPG.\n\nIf you are using a passphrase agent (e.g. gpg-agent) so that you don't have to type your passphrase when signing, you can enable this feature by adding\n\ngit:\n  overrideGpg: true\n\nto your lazygit config file.","messagePattern":"Feature not available for users using GPG\\.\n\nIf you are using a passphrase agent \\(e\\.g\\. gpg-agent\\) so that you don't have to type your passphrase when signing, you can enable this feature by adding\n\ngit:\n  overrideGpg: true\n\nto your lazygit config file\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/commands/git_commands/patch.go","lineNumber":154,"sourceCode":"\n\t\tself.rebase.onSuccessfulContinue = func() error {\n\t\t\tself.PatchBuilder.Reset()\n\t\t\treturn nil\n\t\t}\n\n\t\t// continue\n\t\treturn self.rebase.ContinueRebase()\n\t}\n\n\tif len(commits)-1 < sourceCommitIdx {\n\t\treturn errors.New(\"index outside of range of commits\")\n\t}\n\n\t// we can make this GPG thing possible it just means we need to do this in two parts:\n\t// one where we handle the possibility of a credential request, and the other\n\t// where we continue the rebase\n\tif self.config.NeedsGpgSubprocessForCommit() {\n\t\treturn errors.New(self.Tr.DisabledForGPG)\n\t}\n\n\tbaseIndex := sourceCommitIdx + 1\n\n\tchanges := []daemon.ChangeTodoAction{\n\t\t{Hash: commits[sourceCommitIdx].Hash(), NewAction: todo.Edit},\n\t\t{Hash: commits[destinationCommitIdx].Hash(), NewAction: todo.Edit},\n\t}\n\tself.os.LogCommand(logTodoChanges(changes), false)\n\n\terr := self.rebase.PrepareInteractiveRebaseCommand(PrepareInteractiveRebaseCommandOpts{\n\t\tbaseHashOrRoot: getBaseHashOrRoot(commits, baseIndex),\n\t\toverrideEditor: true,\n\t\tinstruction:    daemon.NewChangeTodoActionsInstruction(changes),\n\t}).Run()\n\tif err != nil {\n\t\treturn err\n\t}","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/jesseduffield/lazygit/blob/c477a2959b229fbf3284be0d4d2904ab61ec3c94/pkg/commands/git_commands/patch.go#L136-L172","documentation":"MovePatchIntoCommit refuses to run when config.NeedsGpgSubprocessForCommit() is true (commit signing configured and git.overrideGpg not set). The operation rewrites history via an interactive rebase that lazygit drives itself; it cannot answer a GPG passphrase prompt mid-flow, so it bails up front and the message explains the overrideGpg escape hatch.","triggerScenarios":"commit.gpgsign=true (or per-repo) with git.overrideGpg unset in lazygit config; using commit signing while trying to move a patch/hunk from one commit to another.","commonSituations":"Work machines with mandatory signing; users who enabled signing for a project then hit disabled features (reword, move patch, etc.).","solutions":["If a passphrase agent (gpg-agent/ssh-agent) supplies the passphrase non-interactively, add `git:\\n  overrideGpg: true` to lazygit config (~/.config/lazygit/config.yml)","Otherwise temporarily disable signing for the operation: `git -c commit.gpgsign=false` equivalent via config, do the change, re-enable","Ensure gpg-agent with cached passphrase is actually running before enabling overrideGpg, otherwise the rebase will hang on the prompt"],"exampleFix":"# before\n# ~/.config/lazygit/config.yml (absent or overrideGpg unset)\n\n# after\ngit:\n  overrideGpg: true","handlingStrategy":"validation","validationCode":"if gitCommands.Config.NeedsGpgSubprocessForCommit() && !appState.GetUserConfig().Git.OverrideGpg {\n    return errors.New(\"enable git.overrideGpg (with gpg-agent) or disable signing to move patches\")\n}","typeGuard":null,"tryCatchPattern":"Check NeedsGpgSubprocessForCommit() before offering the action in the UI (disable the menu entry), so the error never reaches the user; on catching DisabledForGPG, link the user to the overrideGpg config snippet.","preventionTips":["Run gpg-agent with a long cache TTL when using signing + history rewriting","Set overrideGpg: true only if the agent truly caches the passphrase","Keep signing off on repos where you heavily edit history, if policy allows"],"tags":["gpg","rebase","config","interactive"],"backgroundTag":null,"analyzedSha":"c477a2959b229fbf3284be0d4d2904ab61ec3c94","analyzedAt":"2026-08-15T08:34:32.451Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}