下載文件 http://msysgit.googlecode.com/files/PortableGit-1.7.7.1-preview20111027.7z
解壓至 D:\JavaSoft\git-1.7.7.1
增加系統環境路徑:D:\JavaSoft\git-1.7.7.1\bin;D:\JavaSoft\git-1.7.7.1\cmd;
設置系統屬性:
git config --global user.name "your.name"
git config --global user.email git.mail.name@gmail.com
創建密鑰:
mkdir /.ssh
ssh-keygen -f D:\JavaSoft\git-1.7.7.1\.ssh\id_rsa -t rsa -C 'git.mail.name@gmail.com' -t rsa
復制 id_rsa.pub 的內容,到github.com增加公鑰,然后粘貼保存。
測試:git -v -T git@github.com
Hi your.name! You've successfully authenticated, but GitHub does not provide shell access.