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 ...
随机推荐
- IDLE提供的常用快捷键
IDLE提供的常用快捷键 快捷键 说明 适用于 F1 打开Python帮助文档 Python文件窗口和shell窗口均可用 Alt+P 浏览历史命令(上一条) 仅Python Shell窗口可用 Al ...
- 使用 boost.asio 简单实现 异步Socket 通信
客户端: class IPCClient { public: IPCClient(); ~IPCClient(); bool run(); private: bool connect(); bool ...
- shell read变量的读入
shell变量的输入: shell变量除了可以直接赋值或脚本传参外,还可以使用read命令从标准输入获取,read为bash内置命令,可以通过help read查看帮助. 语法格式: read [参数 ...
- 表单取消历史保存之autocomplete的用法
表单取消历史保存之autocomplete的用法 应用场景 浏览器开启了表单自动填充设置后,有些表单中的input元素在添加时会以下拉的形式显示以前填写过的表单,有时候可能会影响用户的使用.比如:da ...
- adb连接手机模拟器
首先,要保证模拟器和电脑在同一网段(手机模拟器设置为桥接模式即可) 我使用的是夜神模拟器. 然后查看一下adb版本, adb version 需要1.0.31往上的版本才能连接. 然后输入 adb c ...
- Java String、StringBuilder、StringBuffer[笔记]
String对象是字符串常量(创建之后不可更改),StringBuilder和StringBuffer对象是字符串变量(可更改),三者主要区别在于执行速度和线程安全. 执行速度 执行速度:String ...
- IIS 发布ASP.NET MVC 4.0 错误500.21解决办法
由VS2013 写好的MVC 4.0 发布在服务器IIS 上报错500.21,解决办法:尝试多种网上介绍的办法,最后发现还是模块问题.
- [福大软工] Z班 第5次成绩排行榜
作业链接 http://www.cnblogs.com/easteast/p/7613070.html 作业要求 团队项目--选题报告 1)发布博客: 一个团队发布一篇随笔,内容为团队的选题报告,选题 ...
- CentOS7使用DevStack快速搭建OpenStack实验环境
安装环境:centos7系统下安装devstack 一.下载Ubuntu14或者Centos7安装(实体机或者虚拟机都可以),建议选择最小安装镜像即可. 二.安装devstack 文档地址 http: ...
- js如何判断对象是否为空
1.将json对象转化为json字符串,再判断该字符串是否为"{}" var data = {}; var b = (JSON.stringify(data) == "{ ...