问题:新环境下,无法直接拉取仓库,需要进行基础配置以及ssh秘钥设置
1、git基础配置
(1)用户名
git config --global user.name "user"
(2)用户邮箱
git config --global user.email "user@xxxx.com"
(3)查看配置是否生效
git config --global user.name
git config --global user.email
2、git 生成 SSH 公钥
ssh-keygen -t rsa -C "user@xxx.com"
根据提示操作,基本上一路回车即可
3、git 增加 SSH 公钥
(1)获取生成的公钥
cat ./.ssh/id_rsa.pub
(2)将生成的秘钥粘贴到远端仓库