Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将目录 scp 到远程服务器,但出现此错误。请帮忙
只需要 [file|localfile|remotefile] 之一或一个或多个嵌套文件集。
ant.scp(todir:"user@mycompany.com:/home/user/db",keyfile:"test.pem") { fileset(dir:"/home/test") }
您使用哪个版本的 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") }