mark’s blog

the continuing adventures of a geek dad

Sunday, August 17, 2008

using git on site5 (the details)

More to remind myself than anything else, this post provides the details for getting started using private git repositories on site5 (and pretty much any other shared hosting service that has ssh available and is willing to install git).

To start, you’ll need to politely ask the technical support people at site5 to install the latest stable redhat git rpm. They did this for me but mentioned that this is with no technical support (ie. if you mess up your repository somehow, you’re on your own) and that you must not leave any server side process running (such as git serve). You’ll also need ssh access to your site5 account – you enable this on backstage.site5.com.

I’m doing this on a brand new ubuntu hardy heron installation as I write this but everything I mention should work equally well on other linux distributions, mac os x and cygwin under windows.

Set up ssh dsa key pair

user@host:~$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_dsa): (hit enter)
Enter passphrase (empty for no passphrase): (enter a passphrase and hit enter)
Enter same passphrase again: (enter the same passphrase and hit enter)
Your identification has been saved in /home/user/.ssh/id_dsa.
Your public key has been saved in /home/user/.ssh/id_dsa.pub.
The key fingerprint is:
15:94:f2:f2:36:a7:37:1b:9c:23:80:30:96:30:ee:00 user@host
user@host:~$ scp ~/.ssh/id_dsa.pub remoteuser@remotehost:
remoteuser@remotehost's password: (enter password and hit enter)
id_dsa.pub 100% 605 0.6KB/s 00:00
user@host:~$ ssh remoteuser@remotehost:
remoteuser@remotehost's password: (enter password and hit enter)
Last login: Sat Aug 9 23:34:20 2008 from 122.122.122.122
[remoteuser@remotehost ~]$ cat id_dsa.pub >> .ssh/authorized_keys

You should now be able to ssh to your site5 account without being prompted for a password (you may be prompted for the passphrase for your key if ssh-agent is not setup – i’ll come back to this).

Create a git repository on site5

[remoteuser@remotehost ~]$ mkdir -p git/repo.git
[remoteuser@remotehost ~]$ cd git/repo.git
[remoteuser@remotehost ~]$ git --bare init
[remoteuser@remotehost ~]$ exit
user@host:~$ mkdir git
user@host:~$ cd git
user@host:~$ git clone ssh://remoteuser@remotehost/~/git/repo.git

Push some changes

user@host:~$ echo 'Here we go' > README
user@host:~$ git add .
user@host:~$ git commit
user@host:~$ git push

Pull changes

(someone else pushes some stuff into your repository)
user@host:~$ git pull

Start ssh-agent

user@host:~$ eval `ssh-agent`
user@host:~$ ssh-add

posted by mark at 11:08 am  

Tuesday, August 5, 2008

wordpress-cli

I thought I should mention something about this awesome wordpress theme that seems to now work only on firefox. Why you can’t ‘telnet’ to other people’s blogs on other themes i’ll never understand.

It was originally written by Rod McFarland and hosted on google code but has recently been taken over by fogus and moved to github. There’s a very low volume email list on google groups. The general direction of the new improved cli is not yet clear.

Apart from the fact that it doesn’t work on many browsers (not sure if it’s just my installation but firefox 3 seems to be the only browser that allows the keyboard events to be correctly captured) and when it does work it makes leaving comments somewhat confusing, I think it is a marvelous invention. It predates goosh by a several years. I’m hoping that this is going to be a common feature of web 2.0+ as i’m fairly sick of needing to use the mouse to interact with web content.

Perhaps it just serves my unique purpose in acting as necessary discouragement from reading any further into the inanity that is my blog.

posted by mark at 11:45 pm  

Powered by WordPress