mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-02 11:47:36 +08:00
[REV] git clone ssh Insecure Ignore HostKey for 3.5
This commit is contained in:
parent
a45c6d0c81
commit
1c091f38cb
@ -36,6 +36,7 @@ import (
|
|||||||
|
|
||||||
"github.com/goodrain/rainbond/pkg/event"
|
"github.com/goodrain/rainbond/pkg/event"
|
||||||
"github.com/goodrain/rainbond/pkg/util"
|
"github.com/goodrain/rainbond/pkg/util"
|
||||||
|
netssh "golang.org/x/crypto/ssh"
|
||||||
git "gopkg.in/src-d/go-git.v4"
|
git "gopkg.in/src-d/go-git.v4"
|
||||||
"gopkg.in/src-d/go-git.v4/plumbing"
|
"gopkg.in/src-d/go-git.v4/plumbing"
|
||||||
"gopkg.in/src-d/go-git.v4/plumbing/protocol/packp/sideband"
|
"gopkg.in/src-d/go-git.v4/plumbing/protocol/packp/sideband"
|
||||||
@ -144,6 +145,7 @@ func GitClone(csi CodeSourceInfo, sourceDir string, logger event.Logger, timeout
|
|||||||
}
|
}
|
||||||
return nil, auerr
|
return nil, auerr
|
||||||
}
|
}
|
||||||
|
sshAuth.HostKeyCallbackHelper.HostKeyCallback = netssh.InsecureIgnoreHostKey()
|
||||||
opts.Auth = sshAuth
|
opts.Auth = sshAuth
|
||||||
rs, err = git.PlainCloneContext(ctx, sourceDir, false, opts)
|
rs, err = git.PlainCloneContext(ctx, sourceDir, false, opts)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user