git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Fw: How do I git-push to an FTP server?

From
KKKonstantin Khomoutov <flatworm-rn4veauk+akrv+lv9mx5uipxlwaovq5f@public.gmane.org>
Date
Oct 5, 2012, 13:38 UTC
Message-ID
<20121005173833.e96c4fcfed0cce5b78911b0b@domain007.com>

On the git-users mailing list we're trying someone to help with running `git push` over FTP. That person is runnig Git 1.7.9.5 on Ubuntu 12.04.

Below is the trace captured while trying to perform such a faulty push. The oddity (in my eyes) is that after uploading the files, Git executes `git http-push` which manual page does not mention FTP at all.

So I'd like to ask experts on Git transports for any advice in this situation.

Begin forwarded message:
Date: Fri, 5 Oct 2012 05:07:24 -0700 (PDT)
From: August Karlstrom <fusio...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: git...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Cc: August Karlstrom <fusio...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [git-users] How do I git-push to an FTP server?

Den fredagen den 5:e oktober 2012 kl. 11:38:43 UTC+2 skrev Konstantin Khomoutov:

Show 20 quoted lines
>
> On Fri, 5 Oct 2012 01:24:21 -0700 (PDT) 
> August Karlstrom <fusio...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> wrote: 
>
> > I get the following error when I run `git push' in a repository 
> > called test: 
> > 
> > error: Cannot access URL ftp://my-ftp-server/git/test.git/, return 
> > code 3 fatal: git-http-push failed 
> > 
> > This is after having successfully cloned the repository from the 
> > address above. 
> Try to run your command while having set GIT_TRACE=1 and 
> GIT_CURL_VERBOSE=1, like 
>
> $ GIT_TRACE=1 GIT_CURL_VERBOSE=1 git push 
>
> and post the results here (if you will fail to infer the cause from
> its output by yourself). 
>

Thanks for the input, Konstantin. Below is the output (with identifying info removed). I can't see what caused "Uploading to a URL without a file name" at the end.

$ GIT_TRACE=1 GIT_CURL_VERBOSE=1 git push
trace: built-in: git 'push'
trace: run_command: 'git-remote-ftp' 'origin' 
'ftp://my-ftp-server/git/test.git'
* About to connect() to my-ftp-server port 21 (#0)
*   Trying my-ftp-ip... * Connected to my-ftp-server (my-ftp-ip) port
21 (#0)
< 220---------- Welcome to Pure-FTPd [privsep] [TLS] ---------- 
< 220-You are user number 6 of 400 allowed. 
< 220-Local time is now 11:23. Server port: 21. 
< 220-This is a private system - No anonymous login 
< 220 You will be disconnected after 15 minutes of inactivity. 
> USER my-username 
< 331 User my-username OK. Password required 
> PASS my-password 

< 230-User my-username has group access to: my-group < 230 OK. Current restricted directory is /

> PWD 
< 257 "/" is your current location 
* Entry path is '/'
> CWD git 
< 250 OK. Current directory is /git 
> CWD test.git 
< 250 OK. Current directory is /git/test.git 
> CWD info 
< 250 OK. Current directory is /git/test.git/info 
> EPSV 
* Connect data stream passively
< 500 Unknown command 
* disabling EPSV usage
> PASV 
< 227 Entering Passive Mode ([not shown]) 
*   Trying my-ftp-ip... * Connecting to my-ftp-ip (my-ftp-ip) port 63983
> TYPE I 
< 200 TYPE is now 8-bit binary 
> SIZE refs 
< 213 59 
> RETR refs 
< 150 Accepted data connection 
* Maxdownload = -1
* Getting file with size: 59
* Remembering we are in dir "git/test.git/info/"
< 226-File successfully transferred 
< 226 0.000 seconds (measured here), 1.34 Mbytes per second 
* Connection #0 to host my-ftp-server left intact
* Re-using existing connection! (#0) with host my-ftp-server
* Connected to my-ftp-server (my-ftp-ip) port 21 (#0)
> CWD / 
< 250 OK. Current directory is / 
> CWD git 
< 250 OK. Current directory is /git 
> CWD test.git 
< 250 OK. Current directory is /git/test.git 
> PASV 
* Connect data stream passively
< 227 Entering Passive Mode ([not shown]) 
*   Trying my-ftp-ip... * Connecting to my-ftp-ip (my-ftp-ip) port 63462
> SIZE HEAD 
< 213 23 
> RETR HEAD 
< 150 Accepted data connection 
* Maxdownload = -1
* Getting file with size: 23
* Remembering we are in dir "git/test.git/"
< 226-File successfully transferred 
< 226 0.000 seconds (measured here), 0.63 Mbytes per second 
* Connection #0 to host my-ftp-server left intact
trace: run_command: 'http-push' '--helper-status' 
'ftp://my-ftp-server/git/test.git/'
'refs/heads/master:refs/heads/master' trace: exec: 'git' 'http-push'
'--helper-status' 'ftp://my-ftp-server/git/test.git/'
'refs/heads/master:refs/heads/master' trace: exec: 'git-http-push'
'--helper-status' 'ftp://my-ftp-server/git/test.git/'
'refs/heads/master:refs/heads/master' trace: run_command:
'git-http-push' '--helper-status' 'ftp://my-ftp-server/git/test.git/'
'refs/heads/master:refs/heads/master'
* About to connect() to my-ftp-server port 21 (#0)
*   Trying my-ftp-ip... * Connected to my-ftp-server (my-ftp-ip) port
21 (#0)
< 220---------- Welcome to Pure-FTPd [privsep] [TLS] ---------- 
< 220-You are user number 7 of 400 allowed. 
< 220-Local time is now 11:23. Server port: 21. 
< 220-This is a private system - No anonymous login 
< 220 You will be disconnected after 15 minutes of inactivity. 
> USER my-username 
< 331 User my-username OK. Password required 
> PASS my-password 

< 230-User my-username has group access to: my-group < 230 OK. Current restricted directory is /

> PWD 
< 257 "/" is your current location 
* Entry path is '/'
* Uploading to a URL without a file name!
* Closing connection #0
error: Cannot access URL ftp://my-ftp-server/git/test.git/, return code
3 fatal: git-http-push failed
-- 
You received this message because you are subscribed to the Google
Groups "Git for human beings" group. To view this discussion on the web
visit https://groups.google.com/d/msg/git-users/-/n_i8DslaCr8J. To post
to this group, send email to git-users-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe
from this group, send email to git-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/git-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Git for human beings" group.
To post to this group, send email to git-users-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to git-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Next: Philippe Vaucher
Message 1 of 14 in “Fw: How do I git-push to an FTP server?”
  1. Konstantin KhomoutovOct 5, 2012
  2. Philippe VaucherOct 5, 2012
  3. Thomas Ferris NicolaisenOct 5, 2012
  4. Konstantin KhomoutovOct 5, 2012
  5. Junio C HamanoOct 5, 2012
  6. Ramkumar RamachandraOct 7, 2012
  7. Jonathan NiederOct 7, 2012
  8. Junio C HamanoOct 7, 2012
  9. Ramkumar RamachandraOct 8, 2012
  10. Jonathan NiederOct 8, 2012
  11. Junio C HamanoOct 8, 2012
  12. Junio C HamanoOct 8, 2012
  13. Jonathan NiederOct 8, 2012
  14. Junio C HamanoOct 8, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.