本系列教程的搭建环境为阿里云服务器,其他服务器可作为参考。
本文主要讲述在服务器中搭建Git
1.用命令yum install git 命令进行安装
2. 然后用命令 git version 查看git 版本
3. 对git进行初始化设置
git config --global user.name "tomatocc"
(tomatocc是git的用户名) 然后回车即可
git config --global user.email "tomatocc@sina.com"
(tomatocc@sina.com是git的用户名邮箱) 然后回车即可
4. 生成授权证书
Git的授权证书是基于公钥和私钥的证书体系,所以需要证书体系
输入命令ssh-