{"record":{"id":"266081bec64a7b1b","repo":"jesseduffield/lazygit","slug":"feature-not-available-for-users-using-gpg-if-you-266081","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/rebase.go","lineNumber":41,"sourceCode":"}\n\nfunc NewRebaseCommands(\n\tgitCommon *GitCommon,\n\tcommitCommands *CommitCommands,\n\tworkingTreeCommands *WorkingTreeCommands,\n) *RebaseCommands {\n\treturn &RebaseCommands{\n\t\tGitCommon:   gitCommon,\n\t\tcommit:      commitCommands,\n\t\tworkingTree: workingTreeCommands,\n\t}\n}\n\nfunc (self *RebaseCommands) RewordCommit(commits []*models.Commit, index int, summary string, description string) error {\n\t// This check is currently unreachable (handled in LocalCommitsController.reword),\n\t// but kept as a safeguard in case this method is used elsewhere.\n\tif self.config.NeedsGpgSubprocessForCommit() {\n\t\treturn errors.New(self.Tr.DisabledForGPG)\n\t}\n\n\terr := self.BeginInteractiveRebaseForCommit(commits, index, false)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// now the selected commit should be our head so we'll amend it with the new message\n\terr = self.commit.RewordLastCommit(summary, description).Run()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn self.ContinueRebase()\n}\n\nfunc (self *RebaseCommands) RewordCommitInEditor(commits []*models.Commit, index int) (*oscommands.CmdObj, error) {\n\tchanges := []daemon.ChangeTodoAction{{","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/jesseduffield/lazygit/blob/c477a2959b229fbf3284be0d4d2904ab61ec3c94/pkg/commands/git_commands/rebase.go#L23-L59","documentation":"RewordCommit's GPG guard: returns DisabledForGPG when signing is on and overrideGpg is unset. Per the comment this branch is currently unreachable because LocalCommitsController.reword intercepts GPG users first, but the method-level guard remains as a safeguard for other callers.","triggerScenarios":"Calling RebaseCommands.RewordCommit directly (scripts, plugins, tests) with commit.gpgsign enabled and git.overrideGpg unset; in the UI it is intercepted earlier so users normally see a different toast.","commonSituations":"Signed-commit shops invoking the command layer programmatically; library consumers embedding lazygit's command packages.","solutions":["Set `git: overrideGpg: true` in lazygit config when a gpg-agent caches the passphrase","Or reword via the UI path, which handles GPG with a dedicated flow","Or disable signing temporarily for the reword"],"exampleFix":"# before\n# config has commit.gpgsign=true, no overrideGpg\nerr := rebaseCmd.RewordCommit(commits, idx, summary, desc) // DisabledForGPG\n\n# after\n# ~/.config/lazygit/config.yml\ngit:\n  overrideGpg: true","handlingStrategy":"validation","validationCode":"if rebaseCmd.Config.NeedsGpgSubprocessForCommit() && !userConfig.Git.OverrideGpg {\n    // use the GPG-capable UI reword flow instead of calling RewordCommit directly\n    return useGuiRewordFlow()\n}","typeGuard":null,"tryCatchPattern":"If calling RewordCommit programmatically, pre-check NeedsGpgSubprocessForCommit() and choose the interactive editor flow (or shell out to `git commit --amend` in a TTY) rather than propagating DisabledForGPG.","preventionTips":["Enable overrideGpg when gpg-agent is configured","Prefer controller-level APIs that already handle GPG","Don't rely on this guard being unreachable — it's the documented safeguard"],"tags":["gpg","reword","rebase","config"],"backgroundTag":null,"analyzedSha":"c477a2959b229fbf3284be0d4d2904ab61ec3c94","analyzedAt":"2026-08-15T08:34:32.451Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}