当前位置:网站首页>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回车就完事了,然后他会提示你成功了。
边栏推荐
- Tensorflow张量生成
- DP1332E刷卡芯片支持NFC内置mcu智能楼宇/终端poss机/智能门锁
- 流,向量场,和微分方程
- Pytorch(16)---搭建一个完整的模型
- In the Visual studio code solutions have red wavy lines
- 基于无监督医学图像配准论文(1)
- Word2vec词向量
- PyTorch②---transforms结构及用法
- The overlapping effect of the two surfaceviews is similar to the video and handout practice in the live effect
- tensorflow实战之手写体识别
猜你喜欢
随机推荐
tensorflow实战之手写体识别
【目标检测】YOLO v5 吸烟行为识别检测
2020-02-06-快速搭建个人博客
PyTorch⑤---卷积神经网络_卷积层
source /build/envsetup.sh和lunch)
The NDK portal: C
机器学习和深度学习中的梯度下降及其类型
文本匹配任务
LLVM系列第二十二章:写一个简单的编译时函数调用统计器(Pass)
FP6293电池升压5V-12V大电流2APWM模式升压方案
ASR6601牛羊定位器芯片GPS国内首颗支持LoRa的LPWAN SoC
LORA芯片ASR6601支持M4内核的远距离传输芯片
图像配置分类及名词解释
FP5207电池升压 5V9V12V24V36V42V大功率方案
神经网络的设计过程
The overlapping effect of the two surfaceviews is similar to the video and handout practice in the live effect
Enhanced Apktool reverse artifact
PHY6222蓝牙5.2支持MESH组网M0内核超低功耗
FP7195芯片PWM转模拟调光至0.1%低亮度时恒流一致性的控制原理
【我的电赛日记(二)】ADF4351锁相环模块









