$ git config --global user.name "foo"
$ git config --global user.email "foo@gmail.com"
$ cd sur
$ git init
$ git add sur.w %my source code
$ git commit -m "first commit"
$ git remote add origin git@github.com:dsmarkchen/sur.git
$ git push origin master
I got permission denied error message. It is not very hard for me to figure it out.
1. try to connect to github by ssh (it helps to know the problem)
ssh -v git@github.com
2. generate the public key
$ cd ~/.ssh
$ ssh-keygen -t rsa
3. Add the the content of id_rsa.pub to github, then I am ready to see
the magic.