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 ...
随机推荐
- c/c++ 字节对齐
c 字节对齐 概念: 结构体里会包括各种类型的成员,比如int char long等等,它们要占用的空间不同,系统为一个结构体开辟内存空间时,会有2种选择. 第一种:节省空间的方案,以上面的列子来说的 ...
- 个人对于 Maven 的理解
个人对于 Maven 的理解 Maven 一直都在使用, 但如果说是不是真的懂 Maven, 很难谈得上. 或许什么时候系统地学习一下, 但在那之前, 打算先记下自己目前对于 Maven 的理解, 之 ...
- "敏捷革命"读书笔记
最近看可一本书 书名叫<敏捷革命>外国著作中文翻译 本来想自己总结读后感但是本书后面都有本章的总结,所以下面都已摘抄为主,以备之后快速浏览 第一章 世界的运作方式已经打破 规划是有用的,而 ...
- linux中find命令高级用法
前言 在<Linux中的文件查找技巧>一文中,我们已经知道了文件查找的基本方法,今天我们介绍find命令的一些高级使用技巧.它能满足我们一些更加复杂的需求. 查找空文件或空目录 有时候需要 ...
- Contest Setting 2018 ICPC Pacific Northwest Regional Contest dp
题目:https://vj.69fa.cn/12703be72f729288b4cced17e2501850?v=1552995458 dp这个题目网上说是dp+离散化这个题目要对这些数字先处理然后进 ...
- Django-rest-framework 接口实现 ModelSerializer 使用
ModelSerializer 使用 不需要单独写字段的 序列化工具类 相当于 ModelForm 写法:以及 注意事项: 继承 serializers.ModelSerializer 在类中填写 c ...
- 设计模式のCommand Pattern(命令模式)----行为模式
一.产生背景 熟悉计算机的同学应该清楚,用户发出各种命令,CPU执行命令,OS负责调度.命令模式(Command Pattern)是一种数据驱动的设计模式,它属于行为型模式.请求以命令的形式包裹在对象 ...
- android studio 定位具体的错误原因
编译一个数据监测APP的时候出现了报错: Error:Compilation failed; see the compiler error output for details. 在网上查到方法如下: ...
- nginx进行反向代理,80端口使用
环境说明:centos7 安装版本:tengine2.2.2 实现目的: 想用本地80端口,代理其它服务器的非80端口,实现80端口复用 [root@tiaobanji conf]# cat ngin ...
- mysql 使用正则表达式查询
SELECT * FROM `qq` where qq_name!='no' and qq_gender='女' and qq_location!='no' and qq_location!='' a ...