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

简介:

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

ssh-keygen.png

1.原因:

公钥出现问题

2.解决办法:

(1)在需要提交文件的目录内,重新设置git用户名字和邮箱

git config --global user.name "yourname" #yourname你设置的名字
git config --global user.email "your@email.com" #你的邮箱

git config.png

(2)生成密钥

ssh-keygen -t rsa -C "your@email.com" #填写设置的邮箱
#回车出现:
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/yz/.ssh/id_rsa):  #请按下回车

Enter passphrase (empty for no passphrase): #回车
Enter same passphrase again: #回车

#出现Your public key has been saved in /c/Users/yz/.ssh/id_rsa.pub 表示成功,公钥保存在/c/Users/yz/.ssh/id_rsa.pub
#复制id_rsa.pub内的公钥

ssh-keygen success.png

(3)打开github,进入设置

点击左侧的 SSH and GPG keys,新建ssh key,将刚才复制公钥粘贴,然后点击添加即可。

github_key.png

相关文章
|
9月前
|
编解码
KeyError: “No object named ‘BSRN‘ found in ‘arch‘ registry!“
KeyError: “No object named ‘BSRN‘ found in ‘arch‘ registry!“
272 0
CMake Error: The source “xxx“ does not match the source “yyy“ used to generate cache. Re-run cmake
CMake Error: The source “xxx“ does not match the source “yyy“ used to generate cache. Re-run cmake
1088 0
“Could not find suitable distribution for Requirement.parse(‘XXXX‘)”的问题
“Could not find suitable distribution for Requirement.parse(‘XXXX‘)”的问题
448 0
|
9月前
|
Java
No tag [else] defined in tag library imported with prefix [c]] with root cause
No tag [else] defined in tag library imported with prefix [c]] with root cause 错误处理
65 0
编译mate-control-center:error: required directory ./help does not exist
编译mate-control-center:error: required directory ./help does not exist
113 0
cl.exe is unable to create an executable file. C compiler test failed.
cl.exe is unable to create an executable file. C compiler test failed.
222 0
|
Java
The type XXX cannot be resolved. It is indirectly referenced from required .class files
The type XXX cannot be resolved. It is indirectly referenced from required .class files
165 0
|
Python
please verify at least one address before registering a new project on PyPI.
please verify at least one address before registering a new project on PyPI.
171 0
please verify at least one address before registering a new project on PyPI.
|
Perl
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `cocoapods`. Y...
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `cocoapods`. Y...
2006 0
|
Python
local variable 'xxx' referenced before assignment
定义了一个全局变量 s ,Python的一个函数里面引用这个变量,并改变它的值, 结果报错local variable 'xxx' referenced before assignment, 代码如下: s = 2   def fun():        if s== 2:           print s         s= 3           错误的意思就是s这个变量在引用前还没有定义,这上面不是定义了么?但是后来我把s= 2这句去掉就好了。
5209 0