Linuxインストールgit
1912 ワード
yum remove git
wget https://github.com/git/git/archive/v2.21.0.tar.gz
yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
tar -zxvf v2.21.0.tar.gz
cd git-2.21.0/
make prefix=/usr/local/git all
make prefix=/usr/local/git install
vim /etc/profile
#
export PATH=/usr/local/git/bin
source /etc/profile
git --versiob
git config --global user.name "nameVal"
git config --global user.email "[email protected]"
git config --global core.autocrlf false
git config --global core.quotepath false
git config --global gui.encoding utf-8
git公開鍵構成
ssh-keygen -t rsa -C "[email protected]"
Could not open a connection to your authentication agent.
eval `ssh-agent`
現れる
Agent pid 14578
ssh-add ~/.ssh/id_rsa
この時点で
Identity added: /root/.ssh/id_rsa (/root/.ssh/id_rsa)
cat ~/.ssh/id_rsa.pub
出現した一連の文字列がgitに埋め込まれます
SSHを使用してコードをクローンできます
git clone [email protected]:xxx/xxx.git