当前位置:网站首页>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.
边栏推荐
猜你喜欢
随机推荐
基于深度学习的配准框架
LLVM系列第四章:逻辑代码块Block
source /build/envsetup.sh和lunch)
FP6293电池升压5V-12V大电流2APWM模式升压方案
Tensorflow常用函数
DP1332E刷卡芯片支持NFC内置mcu智能楼宇/终端poss机/智能门锁
LORA芯片ASR6601支持M4内核的远距离传输芯片
DP4056电源保护芯片锂电池pin对pinTP4056
FP5139电池与适配器供电DC-DC隔离升降压电路反激电路电荷泵电路原理图
jest测试,组件测试
LLVM系列第六章:函数返回值Return
tensorflow实战之手写体识别
PHY6222蓝牙5.2支持MESH组网M0内核超低功耗
6. How to use the CardView production card layout effect
FP7122降压恒流内置MOS耐压100V共正极阳极PWM调光方案原理图
Win11系统找不到dll文件怎么修复
【目标检测】YOLO v5 吸烟行为识别检测
FP7195芯片PWM转模拟调光至0.1%低亮度时恒流一致性的控制原理
Win11电脑一段时间不操作就断网怎么解决
Win10 cannot directly use photo viewer to open the picture