git简介安装

  • 安装
    wget https://github.com/git/git/archive/v2.8.0.tar.gz

  • 安装相关依赖
    sudo yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel crul-devel perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker

  • 解压
    tar -zxvf v2.8.0.tar.gz

  • 进入
    cd /usr/git-2.8.0

  • 编译
    sudo make prefix=/usr/local all

  • 安装
    sudo make prefix=/usr/local install

  • 如果无法安装,使用yum安装
    yum -y install git

  • 生成秘钥
    ssh-keygen -t rsa -C "[email protected]"

  • 加入系统
    ssh-add ~/.ssh/id_rsa

  • 查看秘钥
    cat ~/.ssh/id_rsa.pub

  • 将秘钥放到码云上

  • 克隆
    git clone ----

你可能感兴趣的:(git简介安装)