Git将文件托管到Github上遇到的问题(小白版)

先来一问题描述:
  执行:$  git push -u origin master
   结果
  Warning: Permanently added the RSA host key for IP address '13.250.177.223' to the list of known hosts.
  Permission denied (publickey).
  fatal: Could not read from remote repository.
  从Permission denied (publickey).不难看出,没有权限访问。
   解决问题:
   step1:看看本地是否有.ssh文件
  有三个文件
   step2:接下来我们来查看公钥是什么
   step3:然后我们设置下github,添加一个公钥。
  然后将上面的公钥复制下来,粘贴到key里面就行了。
   step4:接下来看下有没有权限
   step5:我们来看下现在能不能上传到远程
  ok,大功告成。

猜你喜欢

转载自blog.csdn.net/coolcooljob/article/details/79703656