我试图通过scp将一个目录连接到远程服务器,但是我得到了这个错误。请帮帮忙
只需要file|localfile|remotefile或一个或多个嵌套文件集中的一个。
ant.scp(todir:"user@mycompany.com:/home/user/db",keyfile:"test.pem") {
fileset(dir:"/home/test")
}发布于 2012-03-28 17:59:56
你使用哪个版本的ant和groovy?我使用ant 1.8.2,groovy 1.8.6,jsch 0.1.46,ant-jsch 1.6.2,ant这个脚本可以工作:
ant = new AntBuilder()
ant.scp(todir:"user1@mycorp.com:~/temp",keyfile:"/tmp/user1.pem",verbose:true, trust:true, passphrase:""){
fileset(dir:"/user1/temp")
}https://stackoverflow.com/questions/7135771
复制相似问题