git clone ssh 代码:
报错:
Warning: Permanently added 'gitee.com,120.55.226.24' (ECDSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.


因为在GIT上没有对SSH的Key设置:
Key获取方式
1:执行 cd ~/.ssh,查看是否存在文件
2:执行 $ git config --global user.name "xxxxx" ===> 设置git用户名
3:执行 $ git config --global user.email "xxxx@xx.com" ===> 设置git账号
4:执行 $ ssh-keygen -t rsa -C "xxxx@xx.com" 生成秘钥
5:查看生成的文件 (id_rsa    id_rsa.pub  known_hosts),进入id_rsa.pub(vim id_rsa.pub)
 
git==》设置
 

 

 

posted on 2019-02-21 17:35  呼吸able  阅读(159)  评论(0编辑  收藏  举报