diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-04-16 04:17:19 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2017-04-16 04:17:19 +0200 |
commit | 570d0e57186da1e404ef28e1ea53fdd25a0a6043 (patch) | |
tree | 2609c5d95e795e6f7d3c21ee963e5fe27b76830c /plumbing/transport/ssh/common.go | |
parent | 1ab2e250673169e2e279af809539478993003673 (diff) | |
download | go-git-570d0e57186da1e404ef28e1ea53fdd25a0a6043.tar.gz |
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 } |