配置git的ssh

Linux,Windows就在git bash here里面输

① 初始化git账户

git config --global user.name "Eisen"

git config --global user.email "xxxx@xx.com"

②检查ssh keys在电脑上有没有

ls -al ~/.ssh

③ 生成ssh keys

ssh-keygen -t rsa -b 4096 -C "email@example.com"

④确定ssh-agent程序产生了ssh keys

eval "$(ssh-agent -s)"

⑤添加生成的ssh key到ssh-agent

ssh-add ~/.ssh/id_rsa

⑥打开id_rsa.pub,把里面的复制进github

cat ~/.ssh/id_rsa.pub

posted @ 2022-04-04 16:33  EisenJi  阅读(44)  评论(0编辑  收藏  举报