git push 时报错

Posted izyk

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git push 时报错相关的知识,希望对你有一定的参考价值。

技术图片

注册了个新的github账号后, git push 时出现如下报错:

ERROR: Permission to u-zyk/lodash.git denied to i-zyk.

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
之前出现过一次,没错记录,现在记录一下
新账号需要配置秘钥SSH,配置后后黏贴到github上就可以上传成功了
生成秘钥方法:
1. git上输入: ssh-keygen -t rsa -C "your_email@youremail.com 
生成秘钥文件
2.  找到秘钥文件: windows系统上的文件路径  C:UsersAdministrator.ssh  将id_rsa.pub 文件打开复制到github  ssh配置上即可

以上是关于git push 时报错的主要内容,如果未能解决你的问题,请参考以下文章