From 6a904ee7eb6343b245b50aca0397737d7fdba22c Mon Sep 17 00:00:00 2001 From: Vadim Troshchinskiy Date: Tue, 24 Jun 2025 16:29:13 +0200 Subject: [PATCH] Stop ssh from asking for a password on the terminal. Auth has to work through SSH keys always. --- gitlib/gitlib.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gitlib/gitlib.py b/gitlib/gitlib.py index c97bc99..8f5d3f8 100755 --- a/gitlib/gitlib.py +++ b/gitlib/gitlib.py @@ -187,6 +187,11 @@ class OpengnsysGitLibrary: self.logger.setLevel(logging.DEBUG) self.logger.debug(f"Initializing. Cache = {require_cache}, ntfs = {ntfs_implementation}") + self.logger.debug("Ensuring SSH can't ask for passwords on the console") + os.environ["SSH_ASKPASS_REQUIRE"] = "force" + os.environ["SSH_ASKPASS"] = "/bin/false" + + self.fs = FilesystemLibrary(ntfs_implementation = ntfs_implementation) self.disk = DiskLibrary() #self.ntfs = NTFSLibrary()