1. Install git
Because the Mac git address is invalid.
Compile and install
1. Extract
Tar xjvf git-1.7.4.1.tar.tar.bz2
2. Compile
CD git-1.7.4.1
./Configure -- prefix =/usr/local
Make
3. Install
Sudo make install
OK. Which git: Try it ~
Ii. Set SSH
When using SSH links on GitHub, you need to set up SSH
1. Check the SSH key
Cd ~ /. SSH
2. Back up the existing key (if any)
Mkdir key_backup
MV id_rsa * key_backup
3. generate an SSH key
$ Ssh-keygen-t rsa-C jiang.bo.hit@gmail.com
Generating public/private RSA key pair.
Enter file in which to save the key (/users/jiangbo/. Ssh/id_rsa ):
Enter passphrase (empty for no passphrase ):
Enter same passphrase again:
Your identification has been saved in yes.
Your public key has been saved in id_rsa.pub.
The key fingerprint is:
FB: C4: B0: E0: 47: FD: Be: E0: FB: Ea: 73: EF: A8: 29: D5: 22 jiang.bo.hit@gmail.com
The key's randomart image is:
+ -- [RSA 2048] ---- +
|
|
|
|. |
|. S... |
|. OE = o... |
|. + O +... |
|... +... |
| OOB = + O |
+ ----------------- +
4. Add the SSH key to GitHub
Log on to the GitHub page, account settings-> SSH public keys-> Add another key
Copy the generated key (id_rsa.pub file) to the input box and save it.
5. Test Link
$ SSH git@github.com.
The authenticity of host 'github. com (207.97.227.239) 'can't be established.
RSA key fingerprint is 16: 27: AC: A5: 76: 28: 2D: 36: 63: 1b: 56: 4d: EB: DF: A6: 48.
Are you sure you want to continue connecting (Yes/No )? Yes
Pty allocation request failed on channel 0
Hi Jiang-bo! You 've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
Don't worry. This is normal.
3. Set personal information
$ Git config -- global user. Name "Bo Jiang"
$ Git config -- global user. Email "jiang.bo.hit@gmail.com"