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" #你的邮箱
AI 代码解读

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内的公钥
AI 代码解读

ssh-keygen success.png

(3)打开github,进入设置

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

github_key.png

目录
打赏
0
相关文章
Fastadmin列表的多图预览(一行代码)
Fastadmin列表的多图预览(一行代码)
585 0
git 提示:fatal: Could not read from remote repository.
git 提示:fatal: Could not read from remote repository.
1346 0
git 提示:fatal: Could not read from remote repository.
解决Git中fatal: refusing to merge unrelated histories
Git的报错 在使用Git的过程中有时会出现一些问题,那么在解决了每个问题的时候,都需要去总结记录下来,下次不再犯。 一、fatal: refusing to merge unrelated histories 今天在使用Git创建项目的时候,在两个分支合并的时候,出现了下面的这个错误。
109349 6
Android JNI 报错(signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr )
Android JNI 报错(signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr )
1726 1
【Sa-Token】6、Sa-Token集成Redis
Sa-Token 支持 Redis、Memcached 等专业的缓存中间件中, 做到重启数据不丢失,而且保证分布式环境下多节点的会话一致性
2135 0
性能工具之 C/C++ 分析工具 valgrind
【5月更文挑战第26天】性能工具之 C/C++ 分析工具 valgrind
194 2
性能工具之 C/C++ 分析工具 valgrind
解决git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Pleas
解决git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Pleas
2212 0
出现“error: failed to push some refs to ‘https://github.com/****.git‘”,如何解决问题
出现“error: failed to push some refs to ‘https://github.com/****.git‘”,如何解决问题
1512 1
大模型中 .safetensors 文件、.ckpt文件、.gguf和.pth以及.bin文件区别、加载和保存以及转换方式
本文讨论了大模型中不同文件格式如`.safetensors`、`.ckpt`、`.gguf`、`.pth`和`.bin`的区别、用途以及如何在TensorFlow、PyTorch和ONNX等框架之间进行加载、保存和转换。
2856 2
【git】解决git报错:ssh:connect to host github.com port 22: Connection timed out 亲测有效
【git】解决git报错:ssh:connect to host github.com port 22: Connection timed out 亲测有效
3948 1

热门文章

最新文章

AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等

登录插画

登录以查看您的控制台资源

管理云资源
状态一览
快捷访问