gitui-org/gitui · error · anyhow::Error

config tag.gpgsign=true detected. gpg signing not supported.

Error message

config tag.gpgsign=true detected.
gpg signing not supported.
deactivate in your repo/gitconfig to be able to tag without signing.

What it means

Before creating a tag, gitui reads tag.gpgsign from the repo/global config (parsing it as bool, defaulting false). gitui's tag creation path does not support GPG signing, so when the config is true it refuses with this multi-line anyhow::ensure! message rather than silently producing an unsigned tag or failing deep inside the tagging call.

Source

Thrown at src/popups/tag_commit.rs:172

	fn tag_info(&self) -> (String, Option<String>) {
		match &self.mode {
			Mode::Name => (self.input.get_text().into(), None),
			Mode::Annotation { tag_name } => {
				(tag_name.clone(), Some(self.input.get_text().into()))
			}
		}
	}

	pub fn tag(&mut self) -> Result<()> {
		let gpgsign =
			get_config_string(&self.repo.borrow(), "tag.gpgsign")
				.ok()
				.flatten()
				.and_then(|val| val.parse::<bool>().ok())
				.unwrap_or_default();

		anyhow::ensure!(!gpgsign, "config tag.gpgsign=true detected.\ngpg signing not supported.\ndeactivate in your repo/gitconfig to be able to tag without signing.");

		let (tag_name, tag_annotation) = self.tag_info();

		if let Some(commit_id) = self.commit_id {
			let result = sync::tag_commit(
				&self.repo.borrow(),
				&commit_id,
				&tag_name,
				tag_annotation.as_deref(),
			);
			match result {
				Ok(_) => {
					self.input.clear();
					self.hide();

					self.queue.push(InternalEvent::Update(
						NeedsUpdate::ALL,
					));

View on GitHub (pinned to 2fa693cb6e)

Solutions

  1. Disable it for the repo only: git config tag.gpgsign false (or git config --unset tag.gpgsign) - keeps the global default intact.
  2. Or unset globally: git config --global --unset tag.gpgsign.
  3. When you want a signed tag, use the CLI instead: git tag -s <name> -m <message>.

Example fix

# before: gitui tag popup refuses
git config --global tag.gpgsign true
# after: per-repo opt-out
git config tag.gpgsign false   # tagging in gitui works now
# or sign from the shell
git tag -s v1.0 -m "release"
Defensive patterns

Strategy: validation

Validate before calling

# before opening the tag popup
git config --get tag.gpgsign        # any of true/1/on blocks gitui tagging
git config tag.gpgsign false         # per-repo opt-out

// Rust: same probe gitui does
let gpgsign = get_config_string(&repo, "tag.gpgsign").ok().flatten()
    .and_then(|v| v.parse::<bool>().ok()).unwrap_or_default;
ensure!(!gpgsign(), "signed tags unsupported");

Prevention

When it happens

Trigger: tag.gpgsign=true set globally (common in sign-all-the-things setups that also enable commit.gpgsign) or per-repo; opening the tag popup (t in the commit view) and attempting to tag.

Common situations: Users with global signing configs; corporate machines with mandated signing policies; dotfiles copied across machines that enable tag signing everywhere.


AI-assisted analysis of gitui-org/gitui@2fa693cb6e (2026-08-16). Data as JSON: /api/errors/e3e05b762b00ebd7. Report an issue: GitHub.