Hacker News new | past | comments | ask | show | jobs | submit login
Git over FTP (github.com/resmo)
94 points by vinaykola on Oct 13, 2012 | hide | past | favorite | 39 comments



2 Years ago, I contributed to a project that would do the same thing: https://github.com/ezyang/git-ftp Anybody knows the difference ?


This is extremely interesting. I think the main people to benefit from this would be self-deployment kind of people or freelance developers. Mostly freelance devs I believe.

For my stuff, I'd definitely use this - but my first order of business would be to talk people into getting proper hosting so I wouldn't have to. Obviously that's not possible for freelance gigs. I'll definitely use it when I need to deploy to X host. Normally though I do quite a decent job of remembering which files I need to upload, but now I don't have to!!

Excellent stuff though! Thanks for creating this!


The only useful infrastructure that my university will give me is a login account on an ancient (locked down) solaris box, and an ftp account. I could make ftp:// links shareable to colleagues and point them to tortoisegit as a useful client for accessing and editing said stuff using their existing login credentials (via judicious use of chmod) and this would solve a significant problem.


An interesting way of implementing this may be to flip the responsibility of 'translation'.

Here the git client includes logic to speak (translate to) ftp - which is great for this purpose.

What if you could say: `git push fleet master`

where fleet is a remote that translates git-speak into a deployment.

I realize - this is simply an imitation of Heroku. But, it may be interesting to flex git in this way: a code change protocol.

This and the recently discussed codeq could yield some very interesting possibilities.


Git (and Mercurial and friends) have event hooks that can be used for a variety of automation tasks. For instance, I have a repository that consists of Sphinx documentation for a project. When my webserver's copy of the repo receives new changesets, it updates to tip, builds the HTML and PDF targets, and if successful deploys them into the appropriate web-accessible locations.


I wonder if, considering many of these cheap or free web hosts support PHP, you could get git to talk to a PHP script server-side over HTTP?


Just to make it clear, I wasn't the one who made this. It's just a project I found useful. You'll have to thank this guy https://github.com/resmo.


Nifty hack, but doesn't ncftp only upload changed files by default? ISTR running into this exact problem a few years back trying to deploy CakePHP apps to cheapo hosts.

Funny enough, I even did a blog post about it, though it was more about being able to do the equivalent of Rails environments than about the FTP thing: http://ertw.com/blog/2007/11/05/pushing-a-cakephp-app-from-d...


Sorry, off topic but do you still use Cake? Porque?


No, I moved to Rails; Cake was a short lived endeavour. Cake was actually what got me there. I liked the things it did but hated the way it was written. Then I found out they were basically trying to clone Rails in PHP, so I gave Rails a shot.


Ha, nice. Was just thinking of writing something like this for my g/f who is learning HTML/CSS but keeps breaking stuff editing live sites over FTP.


I'm in need of this kind of project, but was looking at a python implementation[0]. Has anyone used either one, and any pointers either way?

---

[0]: https://github.com/ezyang/git-ftp


I used this a while back when I still did PHP work, deploying to shared hosts. I personally enjoyed using it and don't recall having had any issues with it. It's not much use if you have shell access of some sort on your server, though.


I had this problem with FTP/PHP projects. I now use and highly recommend deployhq.


I'm kind of interested in whether he's making any money from that flatr pitch.


Does it work over SFTP? I might be able to use something like that.


If you have SFTP, that implies you have SSH. Why not just use Git over SSH?



Because I host on windows and don't have Git installed.



Why GPLv3? git itself is GPLv2.


Nifty project.

But I have hard time believing that there still are web providers that don't support SSH. Are there any? Good ones?


Free hosting sites generally don't provide SSH access. I'm using 000webhost.com currently, which doesn't.


My organization's public-facing website is on a .mil domain.

Our sysadmins tell us that for compliance reasons, any server-side processing is prohibited and right now the only way to update the site is a combination of RDP and sneakernet. But, until recently, we could update it via ftp. (they got in trouble for it during our last inspection, hence the sneakernet)

I've been playing with the idea of building a new site for our public affairs folks (the ones who are responsible for content) based on pelican or jekyll. Using a static site generator will get us around the no server-side problem, but there is still the problem of needing to transfer an entire site's worth of data avery time there is a small edit made. If we still had ftp access to our server, this would solve that problem.


What about: rsync to the external flash drive (or whatever your sneakernet is based on), then rsync from the flash drive to your public-facing website.


That would make way too much sense.

The server hosting the public-facing site is across town (where the sysadmin works). The RDP step is for getting from our network to a non-public-facing machine that is physically right next to the public-facing machine.

Then, at two or three pre-appointed times during the week, the sysadmin transfers the contents of a folder onto a usb hard drive, and then eventually where it needs to go.

I suppose it's time to start reading the "Who is hiring" threads a little more closely.


stuck on a corporate network managed by dip shit admin's wont open up anything but ftp (and even that will require executive approval).

presume that rather then fighting them you could just use this. the public sector has taught me to look for technical solutions that negate human problems.


Put a cost on not getting what you want. An utterly extortionate one. That will sway the balance. No managerial position will want to be seen driving costs up. Works for me every time.

Fortunately I work at a company now where the software team rules with an iron fist and managers whimper behind their desks at the mighty shitstorm that happens when they put pointless walls up.


Rackspace cloud sites - though we use SSHFS for git.


"No ordinary FTP client can do that."

Use ncftp or lftp. Problem solved.

But there never was a problem. Those ftp client have been around since the mid-1990's. He created a "problem" in order to play with a favorite software: git. This is typical behavior. git is clearly among the softwares, systems (Linux?) and devices (iPhone?) that have "fanboys".

So we can be sure we'll be hearing more about git. More fabricated "problems" to solve. Fanboys are blinded to all of history and all else besides their chosen infatuation.

Meanwhile, no matter how wonderful git is, I still have to install multiple versioning systems (cvs, svn, hg and git, at the bare minimum), because programmers can't agree on just one. Now _that_ is a problem.


> git is clearly among the softwares, systems (Linux?) and devices (iPhone?) that have "fanboys".

They all do. There are MVS fanboys, VM fanboys, ITS fanboys (oh, yes), Windows fanboys, and so on, and so forth. It isn't the technology, it's the people.


True. There is nothing wrong with git. It is great software.

But like a good song, if the radio stations overplay it, they can ruin the enjoyment of it for some listeners.

I think maybe we (nerds) all have the urge to be fanboys. We all have some software that we really like. Yet there are many examples of people who resist the urge to be a fanboy. Alas, the ones who give in to it are the ones who post their follies on the web and announce it to the world. The ones who don't are silent.


With your advanced ftp technology you are blinding me with your retro chic. I need git over smoke signals. Nothing else is 19th century enough.

Seriously, other than it was a fun fidget, what was the point?


You'd be surprised at how few __cheap__ shared hosts provide SSH. Sometimes that's all that's available to you, for cost or managerial reasons.


HostGator and A Small Orange are both cheap shared hosts I can recommend that ssh. The only shared host I have run into that didn't support SSH was $25 / month for 1 MySQL database and some paltry amount of storage space.

I'm sure there are a lot of cheap shared hosts that don't provide SSH, but there are hundreds that do, and the big players (who are the most reliable anyway) definitely do.


What a stupid project!


I don't see how it is stupid.

He encountered a problem: "Most of the low-cost web hosting companies do not provide SSH or git support, but only FTP." He then solved that problem and decided to make the work available to others.


Honestly, why post a comment at all?


Did you forget who developed git? So in this case it's fine ;)

But honestly, I also have a hard time finding a use case for this. The question I ask my self over and over again: why not mount an FTP share and point your origin to it? In fact I did something similar when I was still in university. My desktop computer had my central gip repo, I either pushed to it locally via the FS or remotely via SSH.

Anyways, good thing to have git over FTP but I predict that it will never get traction because it seems to be in part a reimplementation of git?! (At least that's what the github page suggests because every basic git cmd is explained but with some git-ftp prefix... ;))




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: