先来一问题描述:
  执行:$ 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文件
Git将文件托管到Github上遇到的问题(小白版)
  有三个文件
  step2:接下来我们来查看公钥是什么
Git将文件托管到Github上遇到的问题(小白版)
  step3:然后我们设置下github,添加一个公钥。
Git将文件托管到Github上遇到的问题(小白版)
Git将文件托管到Github上遇到的问题(小白版)
  然后将上面的公钥复制下来,粘贴到key里面就行了。
Git将文件托管到Github上遇到的问题(小白版)
  step4:接下来看下有没有权限
Git将文件托管到Github上遇到的问题(小白版)
  step5:我们来看下现在能不能上传到远程
Git将文件托管到Github上遇到的问题(小白版)
  ok,大功告成。

相关文章: