当前位置:网站首页>Please make sure you have the correct access rights and the repository exists. Problem solved
Please make sure you have the correct access rights and the repository exists. Problem solved
2022-08-02 15:22:00 【N.S.N】
Permission denied (publickey).
fatal: Could not read from remote repository.
There is a problem with the public key. You need to set the user and mailbox first and then regenerate the ssh public key.
1. First, I have to reset the name and email address of the identity in git and enter the folder that needs to be submitted (because git Bash is opened directly, in the case of no pathDown, not at all! Method! Change! The pit I encountered when I just used git...)
git config --global user.name "yourname"
git config --global user.email "[email protected]"
Note: yourname is the name you want to set, and [email protected] is the email address you want to set.
2. Delete the known_hosts in the .ssh folder [C:\Users(local user name).ssh] (you can delete it directly)
3. Open bash.exe in the bin directory (usually C:\Program Files\Git\bin) in the downloaded Git and enter the command
$ ssh-keygen -t rsa -C "[email protected]" (please fill in the email address you set)
If the execution is successful.Return:
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/your_user_directory/.ssh/id_rsa):
If there is a previous storage address, it will return /Users/your username/.ssh/id_rsa already exists.Overwrite (y/n)? Enter y directly and press Enter.
Enter passphrase(empty for no passphrase) will appear if the address has not been stored before; also press Enter directly,
In both cases, Enter same passphrase again will appear after pressing Enter, and then pressing Enter will display
Thekey's randomart image is:
±–[RSA 2048]----+
| .o== oo+.o.oo. |
|…+=++…O =… . |
|.o.+oo+.B o o o |
| o…o.o . o |
| o…S o |
| . . o… |
| . . o o |
|. . + |
|oE .o . |
±—[SHA256]-----+
4. Then find the system to automatically generate two files in the .ssh folder, id_rsa and id_rsa.pub, open id_rsa.pub with Notepad and copy all the contents.
5. Open https://github.com/, log in to your account, go to Settings and find
6. Then paste the content you copied into the key and click Add SSH Key
7. Still enter ssh -T [email protected] in bash.exe and a bunch of content will pop up. You just need to type yes and hit enter and you're done, thenHe will prompt you to succeed.
边栏推荐
猜你喜欢
随机推荐
【目标检测】YOLO v5 吸烟行为识别检测
BLE蓝牙5.2-PHY6222系统级芯片(SoC)智能手表/手环
Win10 can't start WampServer icon is orange solution
boost库智能指针
Binder ServiceManager解析
PyTorch(13)---优化器_随机梯度下降法
PyTorch(14)---使用现有的模型及其修改
Do Windows 10 computers need antivirus software installed?
牛客刷题汇总(持续更新中)
“自主可控”的正确姿势
GICv3/v4-软件概述
Impressions of Embrace Jetpack
STL容器自定义内存分配器
tensorflow实战之手写体识别
基于51单片机和物联网的智能家居系统(ESP8266物联网模块)
投资组合理论的简单介绍
数据偏见的背后是什么
Win10上帝模式干嘛的?Win10怎么开启上帝模式?
Mysql connection error solution
Win11系统找不到dll文件怎么修复