当前位置:网站首页>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.问题解决
2022-08-02 14:09:00 【N.S.N】
Permission denied (publickey).
fatal: Could not read from remote repository.
是公钥出问题了,要先设置用户和邮箱再重新生成ssh公钥即可。
1.首先我得重新在git设置一下身份的名字和邮箱 进入到需要提交的文件夹底下(因为直接打开git Bash,在没有路径的情况下,根本没!法!改!刚使用git时遇到的坑。。。)
git config --global user.name “yourname”
git config --global user.email “[email protected]”
注:yourname是你要设置的名字,[email protected]是你要设置的邮箱。
2.删除 .ssh 文件夹【C:\Users(本地用户名).ssh】 中的 known_hosts(直接删除即可)
3.在下载好的Git中的bin目录下(一般是 C:\Program Files\Git\bin)打开bash.exe输入命令
$ ssh-keygen -t rsa -C “[email protected]”(请填你设置的邮箱地址)
如果执行成功。返回:
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/your_user_directory/.ssh/id_rsa):
如果以前有存储地址会返回/Users/your username/.ssh/id_rsa already exists.Overwrite (y/n)?直接输入y回车。
如果以前没有储存地址就会出现Enter passphrase(empty for no passphrase);也直接回车,
两种情况回车后都会出现 Enter same passphrase again 然后接着回车会显示
The key’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.然后找到系统自动在.ssh文件夹下生成两个文件,id_rsa和id_rsa.pub,用记事本打开id_rsa.pub将全部的内容复制。
5.打开https://github.com/,登陆账户,进入设置(Settings)找到
6.然后将你复制的内容粘贴到key中 再点击Add SSH Key
7.仍然在bash.exe中输入ssh -T [email protected]然后会跳出一堆内容你只需输入yes回车就完事了,然后他会提示你成功了。
边栏推荐
猜你喜欢
神经网络的设计过程
FP7128内置MOS降压恒流调光深度0.01%高辉共阳调光方案
PyTorch(12)---损失函数和反向传播
The problem that UIWindow's makeKeyAndVisible does not call viewDidLoad of rootviewController
【深度学习中的损失函数整理与总结】
什么?都0202年了,你还不会屏幕适配?
GICv3/v4-软件概述
FP7195芯片PWM转模拟调光至0.1%低亮度时恒流一致性的控制原理
再见篇:App专项技术优化
[论文阅读] ACT: An Attentive Convolutional Transformer for Efficient Text Classification
随机推荐
FP7195降压恒流PWM转模拟调光零压差大功率驱动方案原理图
LLVM系列第二十七章:理解IRBuilder
Tensorflow张量生成
语言模型(NNLM)
【我的电赛日记(完结)---2021全国大学生电子设计竞赛全国一等奖】A题:信号失真度测量装置
日常-笔记
The Handler you really understand?
PyTorch(14)---使用现有的模型及其修改
7. How to add the Click to RecyclerView and LongClick events
PyTorch②---transforms结构及用法、常见的Transforms
Makefile容易犯错的语法
FP6296锂电池升压 5V9V12V内置 MOS 大功率方案原理图
In the Visual studio code solutions have red wavy lines
“自主可控”的正确姿势
2020-02-06-快速搭建个人博客
GICv3/v4-软件概述
CMAKE
DP1332E内置c8051的mcu内核NFC刷卡芯片国产兼容NXP
LLVM系列第十七章:控制流语句for
App signature in flutter