1. 程式人生 > >linux centos安裝git服務

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