resolve new sftp client failure

This commit is contained in:
yoan 2024-11-05 08:35:37 +08:00
parent 2458fa26d8
commit 718cfccbea

View File

@ -183,7 +183,7 @@ func (d *SSHDeployer) writeSftpFileString(sshCli *ssh.Client, path string, conte
} }
func (d *SSHDeployer) writeSftpFile(sshCli *ssh.Client, path string, data []byte) error { func (d *SSHDeployer) writeSftpFile(sshCli *ssh.Client, path string, data []byte) error {
sftpCli, err := sftp.NewClient() sftpCli, err := sftp.NewClient(sshCli)
if err != nil { if err != nil {
return xerrors.Wrap(err, "failed to create sftp client") return xerrors.Wrap(err, "failed to create sftp client")
} }