From 1c188a7c8abe73332c686cd52bcdaae3626d01e6 Mon Sep 17 00:00:00 2001 From: Andrey Brusnik Date: Fri, 31 Jan 2025 02:06:15 +0400 Subject: [PATCH] fix: enclose in quotes the GPG key identifier in gpg-agent setup --- cmd/ssh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/ssh.go b/cmd/ssh.go index e68b896a6..4139329fa 100644 --- a/cmd/ssh.go +++ b/cmd/ssh.go @@ -641,7 +641,7 @@ func (cmd *SSHCmd) setupGPGAgent( if len(gitGpgKey) > 0 { gitKey := strings.TrimSpace(string(gitGpgKey)) forwardAgent = append(forwardAgent, "--gitkey") - forwardAgent = append(forwardAgent, gitKey) + forwardAgent = append(forwardAgent, fmt.Sprintf("'%s'", gitKey)) } command := strings.Join(forwardAgent, " ")