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

相关文章
|
Android开发
Android JNI 报错(signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr )
Android JNI 报错(signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr )
1923 1
|
Java 开发者 Docker
五种常用的 Spring Boot 热部署方式
【2月更文挑战第5天】
4122 0
五种常用的 Spring Boot 热部署方式
|
缓存 NoSQL 中间件
【Sa-Token】6、Sa-Token集成Redis
Sa-Token 支持 Redis、Memcached 等专业的缓存中间件中, 做到重启数据不丢失,而且保证分布式环境下多节点的会话一致性
2508 0
|
安全 网络安全 开发工具
git 提示:fatal: Could not read from remote repository.
git 提示:fatal: Could not read from remote repository.
1811 0
git 提示:fatal: Could not read from remote repository.
|
网络协议 Linux 数据安全/隐私保护
如何在Windows本地快速搭建SFTP文件服务器,并通过端口映射实现公网远程访问
如何在Windows本地快速搭建SFTP文件服务器,并通过端口映射实现公网远程访问
|
9月前
|
存储 Shell 开发工具
Git和TortoiseGit的安装与使用
Git和TortoiseGit的结合使用,可以大大提高版本控制的效率和便捷性。通过本文的步骤,您可以轻松安装和配置Git及TortoiseGit,并掌握基本的版本控制操作。
1770 82
|
9月前
|
开发工具 git 开发者
vscode+git解决远程分支合并冲突
通过这些详细步骤,您可以掌握如何使用VSCode和Git高效地解决远程分支合并冲突,提高开发效率和代码质量。希望这些内容对您的学习和工作有所帮助。
2134 86
|
开发工具 git
出现“error: failed to push some refs to ‘https://github.com/****.git‘”,如何解决问题
出现“error: failed to push some refs to ‘https://github.com/****.git‘”,如何解决问题
2314 1
|
网络安全 开发工具 git
拉取 gitee 代码,配置SSH,Please make sure you have the correct access rights
拉取 gitee 代码,配置SSH,Please make sure you have the correct access rights
270 1
|
JSON JavaScript 前端开发
如何检查 JavaScript 对象是否为空
【8月更文挑战第18天】
1243 0
如何检查 JavaScript 对象是否为空