首页 > 教学科研 > 教学科研
gradle - Gradle SSH插件从本地vm传输文件到远程vm
发布时间:2024-01-15   点击量:51
字号:

我正在尝试使用Gradle SSH插件将文件从本地计算机传输到远程计算机。
这是我的代码:

//build.gradleplugins {
  id 'org.hidetake.ssh' version '2.9.0'}// Global settingslssh.settings {
  knownHosts = allowAnyHosts    // Disable host key verification}// Add a remote hostssh.remotes {
  webServer {
    host = '52.xxx.xxx.xxx'
    user = 'me'
    password = 'xxxxx'
  }
}task deploy() << {
  ssh.run {
    session(ssh.remotes.webServer) {
      put 'D:\\a\\a.txt', 'C:/webapps'
    }
  }
}


当我运行部署任务时,出现以下错误:

Execution failed for task ':deploy'.


com.jcraft.jsch.JSchException: java.net.ConnectException: Connection timed out: connect


钉钉高效办公
中国知网
视频在线
档案工作
图书资源中心
返回顶部