linux服务器上安装并连接github账户

差点忘记git的使用方法,在新的服务器上安装git

首先一步到位直接安装

sudo yum install git-all

然后设置github地址

git config --global user.name "Your Name"
git config --global user.email "email@example.com"

之后直接在服务器上生成公钥

ssh-keygen -t rsa -C "xx@xx.com"

会给出公钥地址,然后复制一下到github添加公钥的地方

cat /root/.ssh/id_rsa.pub

之后,就可以愉快地进行clone等其他操作嶙

posted @ 2020-12-01 16:09  嶙羽  阅读(1035)  评论(0编辑  收藏  举报