I have installed ftp-git properly. The issue is that when I set git-ftp.url to “ftpupload.net”, it returns: “fatal: Can’t access remote ‘ftp://ftpupload.net’, exiting…”
I have configured it to my username and password. What is the issue?
I don’t know what the issue could be, I’ve never used git-ftp (but it definitely looks interesting!)
Which subcommand are you running exactly that gives this error? And can you try running it with the -vv
flags to get more information on why git-ftp can’t access the FTP server?
Here are the commands I run (I replaced the MY_USERNAME_HERE with my username):
git config git-ftp.url "ftpupload.net"
git config git-ftp.user "MY_USERNAME_HERE"
git config git-ftp.password "*************"
git ftp init
When I run git ftp init -vv
, I get this:
Sat Jun 8 09:39:48 PDT 2019: git-ftp version 1.6.0-UNRELEASED running on MINGW64_NT-10.0 COMPUTER_NAME 2.11.2(0.329/5/3) 2018-11-10 14:38 x86_64 Msys
Sat Jun 8 09:39:48 PDT 2019: Syncroot is './'.
Sat Jun 8 09:39:53 PDT 2019: Host is 'ftpupload.net'.
Sat Jun 8 09:39:53 PDT 2019: User is 'MY_USERNAME_HERE'.
Sat Jun 8 09:39:53 PDT 2019: Password is set.
Sat Jun 8 09:39:53 PDT 2019: CACert is ''.
Sat Jun 8 09:39:54 PDT 2019: Insecure is '0'.
Sat Jun 8 09:39:54 PDT 2019: Proxy is ''.
Sat Jun 8 09:39:54 PDT 2019: Protocol not set, using default protocol ftp://.
Sat Jun 8 09:39:54 PDT 2019: Path is ''.
Sat Jun 8 09:39:55 PDT 2019: The remote sha1 is saved in file '.git-ftp.log'.
Sat Jun 8 09:39:55 PDT 2019: Check if curl is functional.
Sat Jun 8 09:39:55 PDT 2019: Check if ftp://MY_USERNAME_HERE:***@ftpupload.net is accessible.
* Expire in 0 ms for 6 (transfer 0x25930b0)
* Expire in 1 ms for 1 (transfer 0x25930b0)
* Expire in 3 ms for 1 (transfer 0x25930b0)
* Expire in 2 ms for 1 (transfer 0x25930b0)
* Expire in 11 ms for 1 (transfer 0x25930b0)
* Expire in 13 ms for 1 (transfer 0x25930b0)
* Expire in 50 ms for 1 (transfer 0x25930b0)
* Trying 185.27.134.11...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x25930b0)
* Connected to ftpupload.net (185.27.134.11) port 21 (#0)
< 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
< 220-You are user number 620 of 3900 allowed.
< 220-Local time is now 20:27. Server port: 21.
< 220-This is a private system - No anonymous login
< 220 You will be disconnected after 60 seconds of inactivity.
> USER MY_USERNAME_HERE
< 331 User MY_USERNAME_HERE OK. Password required
> PASS ***********
< 230-Your bandwidth usage is restricted
< 230 OK. Current restricted directory is /
> PWD
< 257 "/" is your current location
* Entry path is '/'
> EPSV
* Connect data stream passively
* ftp_perform ends with SECONDARY: 0
< 229 Extended Passive mode OK (|||14561|)
* Trying 185.27.134.11...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x25930b0)
* Connecting to 185.27.134.11 (185.27.134.11) port 14561
* Connected to ftpupload.net (185.27.134.11) port 21 (#0)
> TYPE A
< 200 TYPE is now ASCII
> LIST
< 150 Accepted data connection
* Maxdownload = -1
* Failed writing body (0 != 952)
* Closing connection 0
curl: (23) Failed writing body (0 != 952)
Sat Jun 8 09:39:57 PDT 2019: fatal: Can't access remote 'ftp://MY_USERNAME_HERE:***@ftpupload.net', exiting...
You can use FileZilla instead of git-ftp. It’s better and it works better with Plain FTP (not secure) enabled with host 1113427185.ifastnet.org and port 21, username and password that you can find on the Client Area (for the password click on your hosting account, scroll down, and click on “Show/Hide” to show the password and copy it).
Thank you for adding the debug information.
In the debug output, the following line draws my attention:
Entry path is '/'
It looks to me like git-ftp is trying to upload the files to the root folder of your account, and fails to validate the file uploaded successfully afterwards. This is normal, because you can only upload files to the web accessible htdocs folders. If you can configure git-ftp to upload the files to the htdocs folder instead, it should work.
Taking a quick look at the documentation, I suspect adding the option --remote-root htdocs
to the git ftp init
command might do the trick.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.