10
November
2008
13
October
2008

Pulling from Git over a non-standard SSH port

I must have lost about six or seven hours trying to get a Rails application deploying from Git in the past week. I could push and pull from the repository, but could I get the thing to deploy via Capistrano? No, I could not.

The problem, as far as I could tell, was not with Capistrano. It was a simple SSH problem. I block port 22 for SSH on the server in question, for security reasons, and use a different port. But, no matter how I specified it, Git was insistent on trying to pull over 22. I did a lot of Googling, and found lots of conflicting answers, none of which worked.

And then I learned my lesson. That lesson is: when Linus tells you what to do, you do it:

Use the “.ssh/config” file ;)

So I configured a hostname in .ssh/config on the server, and everything worked instantly.

A lot of problems tend to come down to SSH, it seems. After that point, everything went swimmingly.

  • "There’s a lot of great technology imagery… Here’s a sampling of stills depicting the awesomeness:" Beautiful. (If I had to have a favourite film, it would still be The Conversation).
  • "Normally, one of the first things that admin will do when they set up their blog is to go and remove the Hello world! post. But for this blog, we’ve decided to keep it. The feeling a coder has when they see “Hello world!” for the first time on the tool or system they’re creating is a great feeling. You’ve just given birth to something. It’s still young, fragile, and only a hint of what it someday will be. But it’s alive. Something you’ve made with your own two hands is starting to breath. It has begun."
  • "Our internal research has shown that the return of netbooks is higher than regular notebooks, but the main cause of that is Linux. People would love to pay $299 or $399 but they don’t know what they get until they open the box. They start playing around with Linux and start realizing that it’s not what they are used to. They don’t want to spend time to learn it so they bring it back to the store. The return rate is at least four times higher for Linux netbooks than Windows XP netbooks." That's interesting.

Links & notes for this month

Endnotes