Git push提交时报错Permission denied(publickey)...Please make sure you have the correct access rights and the repository exists.
错误信息为:
Permission denied(publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
可能:
可能没联网
可能没配置好.git/conf文件
可能是与github上的账号没建立密钥对
配置文件: 进入你的仓库,下面有个.git目录里面有conf配置文件,直接vim .git/conf
修改成如下:如果不是git提交是https方式,url和pushurl自己改成自己仓库的地址就好
11
12 [remote "origin"]
13 url = git@github.com:s--enten--/--an.git
14 fetch = +refs/heads/*:refs/remotes/origin/*
15 pushurl = git@github.com:s--enten--/--an.git.git
16 [branch "master"]
17 remote = origin
18 merge = refs/heads/master
建立密钥:
ssh-keygen -t rsa -C "youremail@example.com"
注意,上述youremail@example.com是指github账户的注册邮箱
ssh -v git@github.com
上述命令执行后,出现的提示最后两句是
No more authentication methods to try.
Permission denied (publickey).
ssh-agent -s
上述命令执行后,出现的提示最后两句是
SSH_AUTH_SOCK=/tmp/ssh-GTpABX1a05qH/agent.404; export SSH_AUTH_SOCK;
SSH_AGENT_PID=13144; export SSH_AGENT_PID;
echo Agent pid 13144;
ssh-add ~/.ssh/id_rsa
上述命令执行后,出现提示
Identity added: . . . (这里是一些ssh key 文件路径)
Could not open a connection to your authentication agent.
若第4步中出现上述提示,则执行此步骤,否则执行6
eval 'ssh-agent -s'
ssh-add ~/.ssh/id_rsa
vim ~/.ssh/id_rsa.pub
上述命令执行后id_rsa.pub文件内容将输出到终端,复制里面的密钥(内容一般是以ssh-rsa 开头,以github账号的注册邮箱结尾的,全部复制下来)
进入github账号,在settings下,选SSH and GPG keys, 点击new SSH key
以下可参考这篇博客
Git push提交时报错Permission denied(publickey)...Please make sure you have the correct access rights and the repository exists.的更多相关文章
- git pull 出错 fatal: Could not read from remote repository.Please make sure you have the correct access rights.and the repository exists.
Warning: Permanently added the RSA host key for IP address '192.30.252.131' to the list of known hos ...
- git遇到的问题之“Please make sure you have the correct access rights and the repository exists.”
对于git的提交一直很小心翼翼,感觉一不小心就会踩到莫名的坑. 这不, 某天commit 就遇到了On branch master nothing to commit (working directo ...
- 【Devops】【docker】【CI/CD】jenkins源码管理,添加SSH地址后报错+Jenkins构建报错:Please make sure you have the correct access rights and the repository exists.
jenkins源码管理,添加SSH地址后报错: Could not read from remote repository. Please make sure you have the correct ...
- windows 部署 git 服务器报 Please make sure you have the correct access rights and the repository exists.错误
这两天在阿里云上弄windows 服务器,顺便部署了一个git服务.根据网上教程一步步操作下来,最后在 remote远程仓库的时候提示 fatal: 'yourpath/test.git' does ...
- 【Devops】【docker】【CI/CD】Jenkins源码管理,设置gitlab上项目的clone地址 + jenkins构建报错:Please make sure you have the correct access rights and the repository exists.
注意,如果 jenkins构建报错:Please make sure you have the correct access rights and the repository exists. 而此时 ...
- 使用git时出现Please make sure you have the correct access rights and the repository exists.问题已解决。
使用git时,出现Please make sure you have the correct access rights and the repository exists.问题已解决. 今天我在使用 ...
- [Git]Please make sure you have the correct access rights and the repository exists
这个问题是这样,需要在已有github账号的A机器上,再创建一个github账号,新账号创建完毕,将代码通过机器A push上之后,再另一台机器B,clone 这个项目时报出了如下错误: Permis ...
- git提交时报错 permission denied
git push 时报错:permission denied xxx 目前很多解决办法是生成公钥和秘钥,这种方法安全可靠,比较适用于一台电脑对应一个git账户,但是多个账户在同一台电脑上提交使用git ...
- 报错 Please make sure you have the correct access rights and the repository exists (git 添加ssh密钥 )
1.设置Git的user name和email $ git config --global user.name "wubaiwan" $ git config --global u ...
随机推荐
- K-means算法的matlab程序(初步)
K-means算法的matlab程序 在https://www.cnblogs.com/kailugaji/p/9648369.html 文章中已经介绍了K-means算法,现在用matlab程序实现 ...
- Windows Live Writer 2012在Blogjava管理和发布博客
下载Windows Live Writer 2012的完整版本(wlsetup-all.exe),安装的时候减少网络下载消耗的时间.注:有些平台可能还需要下载DotNet3.5(dotnetfx35. ...
- html 初识
一.web请求流程模拟 python编写的简易服务器应用程序 import socket server=socket.socket() ip_port =('127.0.0.1',8080) serv ...
- 对flexbox伸缩概念的深入浅出解释
flex布局最难理解的,就是剩余空间和伸缩概念了,此文很好的作了解释: https://www.cnblogs.com/ghfjj/p/6529733.html 转自:http://zhoon.git ...
- C#编程の泛型编程
什么是泛型 我们在编写程序时,经常遇到两个模块的功能非常相似,只是一个是处理int数据,另一个是处理string数据,或者其他自定义的数据类型,但我们没有办法,只能分别写多个方法处理每个数据类型,因为 ...
- docker学习笔记(一)-vagrant/docker machine安装docker,阿里云通过docker machine安装docker
首先需要先安装virtualbox https://www.vagrantup.com/ 下载安装vagrant 安装完毕后通过vagrant下载镜像,生成实例 mkdir test_centos7 ...
- linux学习(杂项)
内存使用情况 磁盘使用情况 负载情况 查看cpu 可视化磁盘 循环创建文件夹 删除文件夹 移动文件 gg行首 G行尾 dd删除一行 u恢复 yy复制一行 p粘贴一行 enter下翻 less 与 mo ...
- springboot统一异常处理类及注解参数为数组的写法
统一异常处理类 package com.wdcloud.categoryserver.common.exception; import com.wdcloud.categoryserver.commo ...
- [matlab] 23.matlab自带kmeans函数 实现聚类
clc,clear all; point=[1.40000000000000,0.200000000000000;1.40000000000000,0.200000000000000;1.300000 ...
- day04 if判断、while条件循环、for迭代器循环部分使用举例
一:if判断 1.成绩>=90,那么:优秀 如果成绩>=80且<90,那么:良好 如果成绩>=70且<80,那么:普通 其 ...