GPG error when using 'stack upload'

2019-05-28 14:06发布

问题:

When I run stack upload I get an error:

Environment variable GPG_TTY is not set (see man gpg-agent)

Unable to find gpg2 or gpg executable

The upload appears to succeed, but the error concerns me.

What are the consequences of this error? Is there a way to avoid to suppress it?

回答1:

As per discussion in the comments the errors are due to stack trying to automatically GPG sign packages that are being uploaded as of version 1.1.0.

To my understanding this is a stack-specific feature (with no package signing built into cabal or hackage), and it can be disabled with --no-signature command line option to stack upload.