문제

I'm trying to scp a directory to a remote server, but I'm getting this error. Please help

Exactly one of [file|localfile|remotefile] or one or more nested filesets is required.


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

도움이 되었습니까?

해결책

Which version of ant and groovy do you use? I use ant 1.8.2, groovy 1.8.6, jsch 0.1.46,ant-jsch 1.6.2, ant this script do works:

ant = new AntBuilder()
ant.scp(todir:"user1@mycorp.com:~/temp",keyfile:"/tmp/user1.pem",verbose:true, trust:true, passphrase:""){
    fileset(dir:"/user1/temp")
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top