Monday, December 14, 2009

Git

Git is fast becoming a scm tool of choice for most online development projects( Linux kernel uses it!). There are some excellent screencasts (pity, some require you to pay) that teach you how to work with it. I recently got hooked to git myself and was charmed immensely with the functionality it provided, esp the ability to have your github on web. But getting git (msysgit in my case ) to work behind proxy proved somewhat nightmarish in my home computer running windows. There are some links scattered to help you with it. After struggling for about 4 hours, I got it working using the steps outlined in link .

start msys_git.sh

$ mkdir ~/.ssh

$ chmod 700 ~/.ssh

Create public key/private key pairs using ssh-keygen

$ ssh-keygen -q -f ~/.ssh/id_rsa -t rsa

id_rsa.pub contains the public key. Copy this to git hub creation page.

Steps below are from here


start puttygen ( which should be in same folder as putty ): import the file id_rsa and convert it to create a .ppk file in the same directory.

Start putty.exe
Set the host to ssh.github.com, port 443.

Under Connection / SSH / Auth, select your private key file (.ppk file) for SSH authentication.

Under Connection / Proxy, select HTTP and enter appropriate information for the host and port.

Save your session with a name such as “gitproxy”.

Click “Open” - you should receive a login prompt. Close this.

Start pageant, the putty authentication agent. It appears on sys-tray. Rightclick and load the private key used above (.ppk file).

Back on msys_git command prompt run:


$ git remote add github git@gitproxy:svark/notes.git

$ git config --global user.name "Your Name"

$ git config --global user.email "youremail@gmail.com"

$ mkdir notes

$ cd notes

$ git init

$ touch README

$ git add README

$ git clone http://github.com/svark/notes.git

put plink in the path and make sure we have pagent still running.

$ declare -x GET_SSH="plink".

$ git commit -m 'first commit'

$ git remote add github gitproxy:svark/notes.git

$ git push github master

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?