git密匙生成&git linux tar

git 生成 公匙密匙 rsa key

 

打开gitbash 键入自己的git账号

  ssh-keygen -t rsa -b 4096 -C ""

当提示 "Enter  file in which to save the key," 按回车继续.(默认配置)

当提示,

Enter passphrase (empty for no passphrase): [Type a passphrase] 直接回车

Enter same passphrase again: [Type passphrase again] 直接回车

 

继而:

The key fingerprint is:                                                                                                                                                                      
SHA256:vj4bvA21yiHLaoXCVro2B7cDBg7q2MGGiVrx0A05Dlo your_email@example.com                                                                                                                        
The key's randomart image is:

+---[RSA 4096]----+                                                                                                                                                                          
|     .           |                                                                                                                                                                          
|  E +            |                                                                                                                                                                          
| o + +           |                                                                                                                                                                          
|+ o + .          |                                                                                                                                                                          
|=* * .  S .      |                                                                                                                                                                          
|=.& + .o . .     |                                                                                                                                                                          
|+* B o. * .      |                                                                                                                                                                          
|o.= =. +.O       |                                                                                                                                                                          
| . +.oo.Bo.      |                                                                                                                                                                          
+----[SHA256]-----+

 

 ls -al ~/.ssh

 

PS:

windows 在当前的目录生成的密钥 需要 放到 C:\Users\$用户\.ssh  下  

linux   /root/.ssh

 

 

linux install mathod:

  切换到你的包文件存放目录下

    cd /usr/src

  下载git安装包

    wget https://www.kernel.org/pub/software/scm/git/git-2.8.3.tar.gz

  解压git安装包tar -zxvf git-2.8.3.tar.gz

    cd git-2.8.3

  配置git安装路径

    ./configure prefix=/usr/local/git/

  编译并且安装

    make && make install

  查看git版本号

  git --version

  git已经安装完毕

5、将git指令添加到bash中

  vi /etc/profile

  在最后一行加入

  export PATH=$PATH:/usr/local/git/bin

  让该配置文件立即生效

  source /etc/profile

 

posted @ 2019-01-11 14:34  NHZ-M  阅读(256)  评论(0编辑  收藏  举报