Merge pull request #464 from nan-yu/release-3.x
Expose the ssh diagnostic message
This commit is contained in:
commit
890531f7b0
|
|
@ -1032,9 +1032,9 @@ func setupGitSSH(setupKnownHosts bool) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("can't access SSH known_hosts: %w", err)
|
||||
}
|
||||
err = os.Setenv("GIT_SSH_COMMAND", fmt.Sprintf("ssh -q -o UserKnownHostsFile=%s -i %s", pathToSSHKnownHosts, pathToSSHSecret))
|
||||
err = os.Setenv("GIT_SSH_COMMAND", fmt.Sprintf("ssh -o UserKnownHostsFile=%s -i %s", pathToSSHKnownHosts, pathToSSHSecret))
|
||||
} else {
|
||||
err = os.Setenv("GIT_SSH_COMMAND", fmt.Sprintf("ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i %s", pathToSSHSecret))
|
||||
err = os.Setenv("GIT_SSH_COMMAND", fmt.Sprintf("ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i %s", pathToSSHSecret))
|
||||
}
|
||||
|
||||
// set env variable GIT_SSH_COMMAND to force git use customized ssh command
|
||||
|
|
|
|||
Loading…
Reference in New Issue