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?