Skip to content

Commit

Permalink
openpgp: disable Tor use in dirmngr
Browse files Browse the repository at this point in the history
Pass 'no-use-tor' to avoid automagically using Tor if it's available
on the system (which gnupg does by default)!

This often causes connectivity issues and is a source of great confusion
for users.

See also d54fc1c3f35dca78a66dde10b857ab9ee54c68bc in getuto.

Signed-off-by: Sam James <[email protected]>
Closes: #34
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
thesamesam authored and mgorny committed Jun 17, 2024
1 parent 6ed34d7 commit 5c129e2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gemato/openpgp.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# gemato: OpenPGP verification support
# (c) 2017-2023 Michał Górny
# (c) 2017-2024 Michał Górny
# SPDX-License-Identifier: GPL-2.0-or-later

import base64
Expand Down Expand Up @@ -413,10 +413,13 @@ def __init__(self, debug=False, proxy=None, timeout=None):

with open(os.path.join(self._home, 'dirmngr.conf'), 'w') as f:
f.write(f'''# autogenerated by gemato
# honor user's http_proxy setting
honor-http-proxy
# Disable automagically using Tor when running. This often leads
# to connectivity issues and is unexpected for users.
no-use-tor
# The default of "recursive-resolver" (see "man dirmngr") may cause
# problems with corporate networks, where this is often prohibited.
# It's better to setup the DNS resolver of your choice correctly
Expand Down

0 comments on commit 5c129e2

Please sign in to comment.