git在初次提交代码时报 Permission denied (publickey). fatal: Could not read from remote repository. Please ma - Go语言中文社区

git在初次提交代码时报 Permission denied (publickey). fatal: Could not read from remote repository. Please ma


 

 Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

 

解决办法

首先查看自己机器的public key是多少

使用 cat ~/.ssh/id_rsa.pub
 

 

然后将公钥添加到git仓库配置那里

再次提交代码就提交上去了

版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/resilient/article/details/104558335
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2020-03-01 18:14:18
  • 阅读 ( 1095 )
  • 分类:

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢