gpg: cancelled by user
While signing a release tar.gz with gpg key, I got into this weird issue. After digging the internet I finally got the solution. Here is the error that I got and below is the solution to this issue. [user@host tar]$ gpg --armor --output something.tar.gz.asc --detach-sig something- .tar.gz You need a passphrase to unlock the secret key for user: "user (somthing) " 4096-bit RSA key, ID 654321, created 2012-06-22 can't connect to `/home/user/.gnupg/S.gpg-agent': No such file or directory gpg-agent[7582]: command get_passphrase failed: Operation cancelled gpg: cancelled by user gpg: no default secret key: General error gpg: signing failed: General error Initially I thought I didn't start the gpg-agent [user@host tar]$ eval $(gpg-agent --daemon) I started the gpg-agent with the above eval [user@host tar]$ gpg --armor --output something.tar.gz.asc --detach-sig something- .tar.gz You need a passphrase to unlock the secret key for user: ...