"gpg: cannot open `/dev/tty': No such device or address" on Ubuntu when signing commits
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Triaged
|
Medium
|
Mark Grandi | ||
Breezy |
Fix Released
|
Low
|
Jelmer Vernooij | ||
bzr (Ubuntu) |
Triaged
|
Medium
|
Unassigned | ||
Precise |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
On windows and mac, if you have 'create-signatures always' in your config file, and you try and commit, it correctly spawns the pinentry window (at least using the gpg installations that i have installed). However, on ubuntu, when i have setup gpg, gpg-agent and pinentry correctly (running gpg --clearsign in a terminal will popup the pinentry-gtk-2 window asking for my password), i get the following message in bazaar explorer:
gpg: cannot open `/dev/tty': No such device or address
bzr: ERROR: Failed to GPG sign data with command "['gpg', '--clearsign']"
Its probably because its trying to output to /dev/tty when it doesn't exist in the GUI, so can this be solved by adding the --no-tty switch to the gpg command?
Related branches
- Martin Packman (community): Needs Fixing
- Jelmer Vernooij (community): Approve
- Martin Pool: Needs Fixing
-
Diff: 56 lines (+7/-4)3 files modifiedbzrlib/gpg.py (+1/-1)
bzrlib/tests/test_gpg.py (+3/-3)
doc/en/release-notes/bzr-2.5.txt (+3/-0)
- Martin Packman: Approve
-
Diff: 782 lines (+138/-241)11 files modifiedbreezy/config.py (+0/-17)
breezy/errors.py (+0/-24)
breezy/gpg.py (+98/-81)
breezy/help_topics/en/configuration.txt (+0/-10)
breezy/tests/blackbox/test_log.py (+5/-2)
breezy/tests/features.py (+3/-1)
breezy/tests/test_commit.py (+1/-5)
breezy/tests/test_config.py (+0/-2)
breezy/tests/test_gpg.py (+24/-97)
breezy/tests/test_merge_directive.py (+0/-2)
doc/en/release-notes/brz-3.0.txt (+7/-0)
affects: | bzr-explorer → bzr |
Changed in bzr: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
status: | Confirmed → In Progress |
assignee: | nobody → Mark Grandi (markgrandi) |
Changed in bzr: | |
milestone: | none → 2.5.1 |
status: | Fix Committed → Fix Released |
Changed in bzr (Ubuntu): | |
status: | New → Fix Released |
importance: | Undecided → Medium |
assignee: | nobody → Jelmer Vernooij (jelmer) |
Changed in bzr (Ubuntu Precise): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Jelmer Vernooij (jelmer) |
tags: |
added: verification-done removed: verification-needed |
Changed in bzr: | |
status: | Fix Released → Triaged |
milestone: | 2.5.1 → none |
Changed in bzr (Ubuntu): | |
assignee: | Jelmer Vernooij (jelmer) → nobody |
Changed in bzr (Ubuntu Precise): | |
assignee: | Jelmer Vernooij (jelmer) → nobody |
Changed in bzr (Ubuntu): | |
status: | Fix Released → Triaged |
Changed in bzr (Ubuntu Precise): | |
status: | Fix Released → Triaged |
Changed in brz: | |
status: | New → Triaged |
importance: | Undecided → Low |
assignee: | nobody → Jelmer Vernooij (jelmer) |
milestone: | none → 3.0.0 |
Changed in brz: | |
status: | Triaged → Fix Released |
Hi, Mark, thanks for looking into this.
I suspect using --no-tty unconditionally will break signing from the terminal, so at most we want to do this only when the device doesn't exist.
But I wonder why it isn't finding the agent? What happens if you pass --use-agent? I wonder if GPG_AGENT_INFO is set properly.