14

I've got some problem using git over ftp.

What I've got right now:

  • FTP Server, ready for active and passive FTP;
  • Bare git repository, one commit

The repository was created locally and then sent to the server. I had to use git update-server-info to make it work. Now I can clone into my new repository and execute pulls, but I cannot push. Everytime I try, git says:

error: Cannot access URL ftp://f***@w*****/repo/, return code 3 fatal: git-http-push failed

Can anyone please help me?

Greets Florian

Tornado
  • 261
  • 1
  • 2
  • 10

2 Answers2

15

Note: if your goal is to copy (deploy) files that have changed in your local repo to a ftp server then:

might be better suited for this task.

As far as I know (as confirmed in this thread), there is no support yet for git push to ftp.

Banago
  • 1,350
  • 13
  • 22
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • hm, no, I planned to use the ftp server as "central" repository. as far as I know, ftp was added to git some months ago (see http://www.kernel.org/pub/software/scm/git/docs/git-push.html#URLS ). I tried msysgit and the standard ubuntu 10.04 package (1.7.0.4) for my tests – Tornado Dec 01 '10 at 09:46
  • @Tornado: I did read that git push man page, but I haven't found any other indication that ftp is supported for push (fetch yes, clone yes, but push?) – VonC Dec 01 '10 at 10:13
4

@VonC: Seems you're right, I talked so some GIT guys on IRC and they told me the same. FTP pull works, FTP push doesn't. But anyway, your confirmation thread is a possible solution to my problem, as I can use webdrive/netdrive (and curlftpfs on linux) to make git think the remote repository is a local folder. This is the only solution I see at the moment.

Thank you!

Tornado
  • 261
  • 1
  • 2
  • 10
  • interesting: you could later expand this answer to include some implementation and settings details to achieve that remote repo installation. – VonC Dec 01 '10 at 10:17
  • 2
    Okay, here some details: I only tried under windows so far as linux really sucks on my eee-pc (primary much battery lifetime is lost). But anyway, on windows it's straight-forward: I used Netdrive because a free-for-home-use license is available. With netdrive, I connected to my ftp-server (set it to some drive letter) and then used this now "local" drive as a remote repository (using git clone x:/repo.git in my working directory). That's it. I assume that it works as well mounting some ftp directory with curlftpfs under linux. – Tornado Dec 02 '10 at 20:52