---
title: "Trigger Your GPG Passphrase and Clear Your Agent's Cache — Nick Janetakis"
url: https://daily.dev/posts/trigger-your-gpg-passphrase-and-clear-your-agent-s-cache-nick-janetakis-bp5giqqct
source_url: https://nickjanetakis.com/blog/trigger-your-gpg-passphrase-and-clear-your-agents-cache
type: article
source: "Nick Janetakis"
published: 2026-01-27T12:34:44.725Z
updated: 2026-01-27T12:35:05.601Z
tags: ["security", "automation", "git", "bash"]
reading_time: 3
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Trigger Your GPG Passphrase and Clear Your Agent's Cache — Nick Janetakis

**[Nick Janetakis](https://daily.dev/sources/nickjanetakis)** · 3 min read · 0 upvotes · 0 comments

## Summary

GPG passphrase prompts can cause scripts to hang when signing git commits or performing GPG operations in background processes. Running `echo | gpg --clearsign > /dev/null` triggers the passphrase prompt upfront, allowing subsequent GPG operations to use the cached passphrase. The `gpg-connect-agent reloadagent /bye` command clears the agent's cache for testing purposes. This approach is useful when automating workflows that involve signed commits or GPG operations running in parallel.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://nickjanetakis.com/blog/trigger-your-gpg-passphrase-and-clear-your-agents-cache>

---

Tags: [#security](https://daily.dev/tags/security), [#automation](https://daily.dev/tags/automation), [#git](https://daily.dev/tags/git), [#bash](https://daily.dev/tags/bash)

[View this post on daily.dev](https://daily.dev/posts/trigger-your-gpg-passphrase-and-clear-your-agent-s-cache-nick-janetakis-bp5giqqct)
