git安装步骤
-
安装git
yum -y install git git-core
git version #查看git版本,确认安装是否成功。
-
生成私钥和公钥
cd ~/.ssh
ls
ssh-keygen -t rsa -C "*****@163.com" //不要输入密码,否则以后很麻烦
cat ~/.ssh/id_rsa.pub # 查看公钥
-
修改私钥权限
chmod 600 ~/.ssh/id_rsa.
chown gelu:staff ~/.ssh/id_rsa
-
注册github,并在account set内设置ssh key
github地址: https://github.com
-
登陆github
ssh -T git@github.com # 会看到:Hi gelu8888! You've successfully authenticated, but GitHub does not provide shell access.