Skip to content

Commit b94cc2d

Browse files
committed
fix(gpg): make signing key setup non-fatal in setup-gpg (#731)
Setting user.signingKey in the container is optional — if it fails, GPG agent forwarding and the SSH server should still start. This prevents a bad signing key configuration from tearing down the entire tunnel.
1 parent 39ab118 commit b94cc2d

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

cmd/agent/workspace/setup_gpg.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,8 @@ func (cmd *SetupGPGCmd) Run(ctx context.Context, log log.Logger) error {
135135

136136
if gpgConf.GitKey != "" {
137137
log.Debugf("Setup git signing key")
138-
err = gitcredentials.SetupGpgGitKey(gpgConf.GitKey)
139-
if err != nil {
140-
log.Errorf("Setup git signing key: %v", err)
141-
return err
138+
if err := gitcredentials.SetupGpgGitKey(gpgConf.GitKey); err != nil {
139+
log.Warnf("Setup git signing key failed (non-fatal): %v", err)
142140
}
143141
}
144142

0 commit comments

Comments
 (0)