jesseduffield/lazygit · warning

Feature not available for users using GPG. If you are using

Error message

Feature not available for users using GPG.

If 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

git:
  overrideGpg: true

to your lazygit config file.

What it means

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.

Source

Thrown at pkg/commands/git_commands/rebase.go:41

}

func NewRebaseCommands(
	gitCommon *GitCommon,
	commitCommands *CommitCommands,
	workingTreeCommands *WorkingTreeCommands,
) *RebaseCommands {
	return &RebaseCommands{
		GitCommon:   gitCommon,
		commit:      commitCommands,
		workingTree: workingTreeCommands,
	}
}

func (self *RebaseCommands) RewordCommit(commits []*models.Commit, index int, summary string, description string) error {
	// This check is currently unreachable (handled in LocalCommitsController.reword),
	// but kept as a safeguard in case this method is used elsewhere.
	if self.config.NeedsGpgSubprocessForCommit() {
		return errors.New(self.Tr.DisabledForGPG)
	}

	err := self.BeginInteractiveRebaseForCommit(commits, index, false)
	if err != nil {
		return err
	}

	// now the selected commit should be our head so we'll amend it with the new message
	err = self.commit.RewordLastCommit(summary, description).Run()
	if err != nil {
		return err
	}

	return self.ContinueRebase()
}

func (self *RebaseCommands) RewordCommitInEditor(commits []*models.Commit, index int) (*oscommands.CmdObj, error) {
	changes := []daemon.ChangeTodoAction{{

View on GitHub (pinned to c477a2959b)

Solutions

  1. Set `git: overrideGpg: true` in lazygit config when a gpg-agent caches the passphrase
  2. Or reword via the UI path, which handles GPG with a dedicated flow
  3. Or disable signing temporarily for the reword

Example fix

# before
# config has commit.gpgsign=true, no overrideGpg
err := rebaseCmd.RewordCommit(commits, idx, summary, desc) // DisabledForGPG

# after
# ~/.config/lazygit/config.yml
git:
  overrideGpg: true
Defensive patterns

Strategy: validation

Validate before calling

if rebaseCmd.Config.NeedsGpgSubprocessForCommit() && !userConfig.Git.OverrideGpg {
    // use the GPG-capable UI reword flow instead of calling RewordCommit directly
    return useGuiRewordFlow()
}

Try / catch

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.

Prevention

When it happens

Trigger: 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.

Common situations: Signed-commit shops invoking the command layer programmatically; library consumers embedding lazygit's command packages.

Related errors


AI-assisted analysis of jesseduffield/lazygit@c477a2959b (2026-08-15). Data as JSON: /api/errors/266081bec64a7b1b. Report an issue: GitHub.