RCurl working in interactive mode but not through non-interactive
YvesCR opened this issue · comments
I have a script which call Rcurl that I want to automate.
RCurl::getURL(path_folder_sftp
, userpwd = "my_pwd"
, verbose=TRUE
, ftp.use.epsv=TRUE
, dirlistonly = T)
It works well in interactive mode.
when using cmd or powershell:
C:/PROGRA~1/R/R-3.6.0/bin/Rscript.exe "C:/test/my_test.R" >> "C:/test/log/my_test.log" 2>&1
It fails and return following error:
- Trying my.server.address...
- Connected to sftp.myaddress port 22 (#0)
- SSH MD5 fingerprint: numbers here
- SSH authentication methods available: publickey,password
- Using SSH public key file '(nil)'
- Using SSH private key file ''
- SSH public key authentication failed: Unable to extract public key from private key file: Unable to open private key file
- Initialized password authentication
- Authentication complete
- Connection #0 to host sftp.myaddress left intact
Not sure if it a RCurl issue though.
closing issue, here. Issue was due to different environment :(