linux centos安装git服务

下载git程序包

wget https://github.com/git/git/archive/v2.14.1.zip

安装依赖

sudo yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel curl-devel perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker

解压git

unzip v2.14.1.zip

将git安装到/usr/local上

先进入git文件夹

cd git-2.14.1

编译

make prefix=/usr/local all

安装

make prefix=/usr/local install

验证是否安装完成

git --version

生成ssh密钥

ssh-keygen -t rsa -C "[email protected]"

查看ssh公钥

cat ~/.ssh/id_rsa.pub

将密码复制到码云/github上面

git clone https://github.com/emqtt/emq-relx.git

git克隆信息报错

git使用https协议出错:Peer reports incompatible or unsupported protocol version.

sudo yum update nss curl 

猜你喜欢

转载自blog.csdn.net/liqi_q/article/details/83069674