From 2a8ef71e8f0a1c82a44b6f8e23ec77613124f036 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Fri, 23 May 2025 11:34:57 +0200 Subject: [PATCH] Use PTY also with credentialStrategy=FAIL This is a regression introduced with a199ed1396c; it is important to use a PTY even with credentialStrategy=FAIL, otherwise the fetch command will spew the credentials request into the UI and then hang. This fixes the problem that background fetching makes lazygit hang when the fetch request needs to prompt for a passphrase. For Mac users who use the keychain to store their ssh passphrases, this can happen when lazygit is running while the machine goes to sleep, because macOS looks the keychain in that case. --- pkg/commands/oscommands/cmd_obj.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/commands/oscommands/cmd_obj.go b/pkg/commands/oscommands/cmd_obj.go index 184afa789..96392dcb4 100644 --- a/pkg/commands/oscommands/cmd_obj.go +++ b/pkg/commands/oscommands/cmd_obj.go @@ -196,6 +196,7 @@ func (self *CmdObj) PromptOnCredentialRequest(task gocui.Task) *CmdObj { func (self *CmdObj) FailOnCredentialRequest() *CmdObj { self.credentialStrategy = FAIL + self.usePty = true return self }