wget https://github.com/git/git/archive/master.zip
unzip master.zip
cd git-master
make configure
./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv
make
make install
* 当然,上面的操作也可以用官网的方法,不过安装的便不是最新的版本,而是系统适配的版本
1
yum install git
## 查看版本
1
2
[iyunv@yw_home ]# git --version
git version 2.1.0-rc0
[git@git git]# mkdir /home/git/.ssh
[git@git git]# chmod 700 /home/git/.ssh
[git@git git]# cd /home/git/.ssh
[git@git git]# ssh-keygen -b 1024 -t rsa -f job
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in job.
Your public key has been saved in job.pub.
The key fingerprint is:
bb:90:6e:37:75:3a:6d:f5:81:eb:e4:7b:36:31:69:41 root@Localhost
The key's randomart image is:
+--[ RSA 1024]----+
| |
| E |
| . |
| . |
| S . o|
| . .. ...* |
| o .. + oo.+|
| ...o.o =. +.|
| ..... o.++ .|
+-----------------+
[iyunv@yw_home git]# ls .ssh/
job job.pub