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:\Users\Administrator\.ssh  将id_rsa.pub 文件打开复制到github  ssh配置上即可

posted @ 2020-03-09 14:57  izyk  阅读(205)  评论(0编辑  收藏  举报