git 上传项目失败

git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

这是因为git秘钥出错,重新设置就行

 

获取秘钥方式:

第一、验证用户名和邮箱  git config --global --list

第二、ssh-keygen -t rsa -C "自己的邮箱地址" 生成秘钥

第三、去C:\Users\Administrator\.ssh文件夹加  打开id_rsa.pub文件,把里面的内容复制

第三、去github网站添加秘钥

 

posted @ 2020-05-12 11:09  zhaobao1830  阅读(351)  评论(0编辑  收藏  举报