diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-04-17 23:43:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-17 23:43:12 +0200 |
commit | c68ac9efc98e11b88f143e0e083403624a794baf (patch) | |
tree | 21b662b6e1df3a86febbc3f6d2f933ba1677ca6c /plumbing/transport/ssh/common.go | |
parent | c991d2d1c2253ac246441bc92bf97804a73c0bf2 (diff) | |
parent | 649de29be54e62ed40a2bc6466f2eac2884fc8f9 (diff) | |
download | go-git-c68ac9efc98e11b88f143e0e083403624a794baf.tar.gz |
Merge pull request #346 from mcuadros/ssh-known-hosts
transport: ssh, default HostKeyCallback
Diffstat (limited to 'plumbing/transport/ssh/common.go')
-rw-r--r-- | plumbing/transport/ssh/common.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plumbing/transport/ssh/common.go b/plumbing/transport/ssh/common.go index 5ed64d4..9b484f9 100644 --- a/plumbing/transport/ssh/common.go +++ b/plumbing/transport/ssh/common.go @@ -82,7 +82,13 @@ func (c *command) connect() error { } var err error - c.client, err = ssh.Dial("tcp", c.getHostWithPort(), c.auth.clientConfig()) + config := c.auth.clientConfig() + config.HostKeyCallback, err = c.auth.hostKeyCallback() + if err != nil { + return err + } + + c.client, err = ssh.Dial("tcp", c.getHostWithPort(), config) if err != nil { return err } |