问题
I'm following tutorial on http://anantgarg.com/2013/09/25/git-ftp-for-windows/ and get error:
$ git ftp init
There are 720 files to sync:
[1 of 720] Buffered for upload '.gitignore'.
[2 of 720] Buffered for upload 'wp-config-sample.php'.
....
[24 of 720] Buffered for upload 'wp-content/plugins/woocommerce/admin/post-types/writepanels/order-item-html.php'.
Uploading ...
fatal: Could not upload files., exiting...
what could be the problem? I've set the password using quotes ( 'mypassword' ) but same error still occur
回答1:
You can see output of the exact error by using the '-v' flag for super-verbose output.
The problem could be one of the following
- Incorrect FTP credentials - check that the server, username, and password are all correct.
- URL/server: make sure to include the protocol with the URL if not standard FTP
(
sftp://ftp.domain.com:22
). - Password: Try also removing the quotes around the password
- URL/server: make sure to include the protocol with the URL if not standard FTP
(
- The server path is not set or incorrect. Often, an FTP login takes you to the server root. You may not have write-privileges there. You'll need to set the site root path.
- try setting path with in the URL argument
ftp://ftp.domain.com/public_html
- try setting path with in the URL argument
Try doing an 'init' via command-line arguments instead (NOT via Git config settings) and set verbose output using '-v':
git ftp init -u username -p 'password' -v ftpserverurl.com
回答2:
I think you should use ftp-git, it's a GUI tool to push changed files in git repository to ftp server. And it's more error-friendly.
You can check the changed files in GUI way, and it can save your ftp connection details for future use.
来源:https://stackoverflow.com/questions/20533394/could-not-upload-files-error-in-gitftp