【问题标题】:Gant, Groovy scp and AntGant、Groovy scp 和 Ant
【发布时间】:2011-10-31 10:27:20
【问题描述】:

我正在尝试将目录 scp 到远程服务器,但出现此错误。请帮忙

需要 [file|localfile|remotefile] 或一个或多个嵌套文件集之一。

ant.scp(todir:"user@mycompany.com:/home/user/db",keyfile:"test.pem") { fileset(dir:"/home/test") }

【问题讨论】:

    标签: grails ant groovy scp gant


    【解决方案1】:

    您使用哪个版本的 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")
    }
    

    【讨论】:

    • 我设法让我的工作方式和你一样。 :-) 无论如何谢谢。
    猜你喜欢
    • 1970-01-01
    • 2012-10-16
    • 2013-01-07
    • 2011-09-15
    • 2023-03-09
    • 2014-10-19
    • 1970-01-01
    • 2013-08-07
    • 2014-06-30
    相关资源
    最近更新 更多