You need to run git update-server-info
on the server :)
If the repository is non-bare (i.e. has a .git
directory), you also need to append /.git
to the path as mentioned by @Rohit Pothuraju.
How do you debug problems like this?
My first attempt was to to get a verbose log out of vsftpd. I read the manual and set the relevant options, but it didn't work (the log was empty).
So I fell back to intercepting the TCP connection. The most primitive way to do that is have three terminal windows running the following commands:
1. nc -v x.x.x.x 21 # connect to the real server
2. nc -l -v -p 1234 # listen on some port
# if it says "This is nc from the netcat-openbsd package", remove the '-p'
3. git clone ftp://localhost:1234/testGit/ testGit
# the program you want to debug, but with the server address replaced
Now you'll see messages from the server in Terminal 1 and messages from the program in Terminal 2. When you see a message in one terminal, copy it and paste it into the other terminal. Keep going until the session ends.
Tips:
The -v
flag causes netcat to print one or two debugging lines. Make sure you don't copy them between the two terminals! In Terminal 1 this should be similar to
localhost [123.0.01] (?) open
and in Terminal 2 it should be similar to
listening on [any] 1234...
connect to [127.0.0.1] from localhost [1237.0.0.1] 53929
With some protocols (such as FTP) the server sends the first message. Don't forget to copy that message over once the program connects, otherwise it will wait forever.