linux中git源码编译并且配置远程仓库

1.下载

链接:https://pan.baidu.com/s/1rK8c7WIAyuoHDo2eVruGMQ 
提取码:ax8a

2.解压

tar -zxvf --------.tar.gz

3.编译

make prefix=/usr/local/git all
make prefix=/usr/local/git install

4.配置环境变量

vim /etc/profile

 生效配置文件 source /etc/profile

5.配置git信息

     (1) . 设置git的 user name和 email
           git config --global user.name "xxx"
           git config --global user.email "[email protected]"

      (2) . 生成SSH密钥过程
          1.查看是否已经有了ssh密钥:cd ~/.ssh
             如果没有密钥则不会有此文件夹,有则备份删除
          2.生存密钥
             ssh-keygen -t rsa -C “[email protected]

 而后我们将id_rsa.pub里的内容复制粘贴到gitthub账号设置里的ssh-key,title随便填,ssh-key里为id_rsa.