Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
cURL is a command line tool that can be used to send or receive files. cURL.exe supports numerous protocols like HTTP, HTTPS, FTP, FTPS, SFTP, LDAP, TELNET, SMTP, POP3 etc. For more information please refer the below links:
https://en.wikipedia.org/wiki/CURL
https://curl.haxx.se/docs/
curl.exe -T <path-to-file-that-needs-to-be-deployed> -u "username:password" "FTP URL"
From curl documentation
-T, --upload-file FILE Transfer FILE to destination--url URL URL to work with -u, --user USER[:PASSWORD] Server user and password--tlsuser USER TLS username--tlspassword STRING TLS password--tlsauthtype STRING TLS authentication type (default SRP)
https://curl.haxx.se/download.html
For FTPS
- Browse to the following location: https://curl.haxx.se/docs/caextract.html
- Right click and download the "cacert.pem" file and rename the file extension to ".crt" (Use Chrome)
C:\>curl -T C:\sample.war -u "kaushalp\$kaushalp:<password>" ftp://waws-prod-sg1-005.ftp.azurewebsites.windows.net/site/wwwroot/
While using cURL via FTPS (FTP over SSL), the following error may be encountered when trying to connect over HTTP.
The following error is seen because curl will try to verify the certificate received in the Server Hello and it fails as it couldn’t verify the CA who issued the certificate.
This problem can be addressed by using an additional parameter either --cacert or -k can be specified.
C:\>curl -T C:\sample.war -u "kaushalp\$kaushalp:<password>" ftps://waws-prod-sg1-005.ftp.azurewebsites.windows.net/site/wwwroot/ -k
-k, --insecure Allow connections to SSL sites without certs (H)
C:\>curl -T C:\sample.war -u "kaushalp\$kaushalp:<password>" ftps://waws-prod-sg1-005.ftp.azurewebsites.windows.net/site/wwwroot/ --cacert e:\tools\kaushal-bundle.crt
--cacert FILE CA certificate to verify peer against (SSL)
Error: "curl: (25) Failed FTP upload: 550"
This error is seen when the FTP URL does not contain a trailing slash "/".
Here is the default list of CA's that are supported by curl: https://curl.haxx.se/ca/cacert.pem (This was the file that was downloaded under pre-requisites)
Users can generate their own crt file and pass it to CURL.
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in