git相关配置

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lu1171901273/article/details/85684685

centOS中安装git
yum install git

检查git版本
git version

git的相关配置
git config --global user.name "luxing"
git config --global user.email "[email protected]"

git的ssh配置

ssh-keygen -t rsa -C "luxing@qq" 

查看ssh秘钥

[root@localhost ~]# cd ~/.ssh/
[root@localhost .ssh]# ll

连接github,打开github,登陆,进入setting,选中SSH and GPG keys 点击New SSH key,

vim id_rsa.pub,讲里面的内容复制到key中,验证是否成功

[root@localhost .ssh]# vim id_rsa.pub 
[root@localhost .ssh]# ssh [email protected]

猜你喜欢

转载自blog.csdn.net/lu1171901273/article/details/85684685