Issue with GPG signing within a Buildbot CIintegration: missing a --no-tty argument to aptly publish

376 views
Skip to first unread message

damien...@gmail.com

unread,
Aug 1, 2016, 9:33:14 AM8/1/16
to aptly-discuss
Hi all.
I have integrated aptly within our buildbot CI integration server.
Works well when I'm not signing the publish by forcing the --skip-signing

However, when want to use the GPG key, I have an error:

<pre>
Signing file 'Release' with gpg, please enter your passphrase when prompted:
gpg: cannot open `/dev/tty': No such device or address
ERROR: unable to publish: unable to detached sign file: exit status 2
</pre>

This is due to the fact that aptly is not running in a terminal.
It's running from a script that calls a
<pre>
'bash','-c','aptly publish update -passphrase="mypassphrase" precise'
</pre>

This is a known issue in GPG, and can be solved easily by forcing the GPG command line with a --no-tty argument

However this command line is now "hidden" within the aptly code...

So, would it be possible to add to "aptly publish" call an additional --not-tty parameter to force the call to gpg...

Or any other solution?

Thanks
Damien

Harald Sitter

unread,
Aug 1, 2016, 9:58:41 AM8/1/16
to damien...@gmail.com, aptly-discuss
$ aptly help publish update |grep tty
-batch=false: run GPG with detached tty

selv...@gmail.com

unread,
Dec 12, 2016, 7:49:08 AM12/12/16
to aptly-discuss, damien...@gmail.com

Hi,
Is it possible publish repo from the remote machine?

I am getting the same error even though I use batch flag.

# ssh aptly@aptly1 "/home/aptly/aptly_0.9.7_linux_amd64/aptly publish repo -batch=false -passphrase-file=/home/aptly/.gnupg/gpg_passphrase debian"

Loading packages...
Generating metadata files and linking package files...
Finalizing metadata files...


Signing file 'Release' with gpg, please enter your passphrase when prompted:

gpg: cannot open tty `/dev/tty': No such device or address


ERROR: unable to publish: unable to detached sign file: exit status 2

can you assist me to solve this issue?

selv...@gmail.com

unread,
Dec 13, 2016, 4:34:38 AM12/13/16
to aptly-discuss, damien...@gmail.com, selv...@gmail.com

Sorry. I misunderstood the batch option comments. It is worked when I try with -batch=true.

Thanks.

Reply all
Reply to author
Forward
0 new messages