0

I'm trying to copy some files into a specific folder that's located in a network server that requires for me to enter a username and password.

I found this and I'm currently trying to get it to work but I'm stuck. I added site onto my build.gradle along with its url and authenticationInfo but I can't seem to figure out how to connect it with the copy task.

So far I have:

site {
    url = 'sftp://MyServer/var/'
    authenticationInfo {
        userName = 'un'
        password = 'pw'
    }
}

task copyTask(type: Copy) {
    from "/LocalFolder/"
    into "sftp://MyServer/var/www/html/folder"
}

When I run ./gradlew copyTask, I get:

Execution failed for task ':copyTask'.
\> Failed to create parent directory '/www' when creating directory '/www/html/revealjs'

How can I copy my files from LocalFolder into "sftp://MyServer/var/www/html/folder" directory?

halfer
  • 19,824
  • 17
  • 99
  • 186
sparkhee93
  • 1,381
  • 3
  • 21
  • 30
  • Are you sure you have write access to the ftp server? – ambes Oct 16 '15 at 19:19
  • I think so. Once I'm authenticated, I can go into the server and modify any of the files that I want. I thought the plugin that I mentioned would be able to but at this point, I'm walking blindly. – sparkhee93 Oct 16 '15 at 19:25

0 Answers0