Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights
第一次提交遇到这样的情况,怎么回事呢,我在github上提交了ssh key 的啊。
排查先看看能不能解析,
1.先 ping https://github.com
把ip添加到 host : sudo vi /etc/hosts (添加下面第三行)
127.0.0.1 localhost localhost.localdomain VM-0-6-ubuntu
127.0.1.1 TENCENT
192.30.255.113 github.com # 添加ip # The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
192.30.255.113 github.com
~
2.如果不行的话看看自己有没有输入错误的创库地址
查看配置
cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = git@github:cuzz1/flask.git # 错误的
url = git@github.com:cuzz1/flask.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
3. 现在提交还出现
那就是github 上的ssh key 添加错了,我们用ssh-keygen -t rsa -C "xxxx@163.com" 会生成在很多目录下,比如root/.ssh、 /home/ubuntu/.ssh 都有ras_id.pub
所以我们不能添加错了。必须在 ~/.ssh目录下 才有用,要是当前目录,把 ~/.ssh/ras_id.pub 拷到github上就可以了。
现在提交就可以了。
感谢军哥的帮忙 ,微信公众号 Python之禅
Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights的更多相关文章
- github Permission denied (publickey). fatal: Could not read from remote repository.
github Permission denied (publickey).fatal: Could not read from remote repository. ----------------- ...
- 【git基础】Permission denied (publickey). fatal: Could not read from remote repository
运行以下git命令的时候出现错误 git push -u origin master error The authenticity of host 'github.com (13.250.177.22 ...
- 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 ...
- github下载报错:Permission denied (publickey). fatal: Could not read from remote repository.
Permission denied (publickey). fatal: Could not read from remote repository. 博主在github上下载tiny face的的 ...
- Permission denied (publickey). fatal: Could not read from remote repository.
博主在github上下载tiny face的的源代码的时候,遇到git clone命令为:git clone --recursive git@github.com:peiyunh/tiny.git 而 ...
- Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts. Permission denied (publickey). fatal: Could not read from remote repository. Please make sure y
这个应该是很多github新手经常出错的问题,这个就是没有在你github上添加一个公钥. 下面就直接说步骤: 1 可以用 ssh -T git@github.com去测试一下 图上可以明显看出缺少了 ...
- git克隆出错 github clone Permission denied (publickey) fatal Could not read from remote repo
原文网址:http://blog.csdn.net/feeling450/article/details/53067563 github clone "Permission denied ( ...
- Permission denied (publickey). fatal: The remote end hung up unexpectedly 解决办法
这两天学习git的时候,在本地创建了一个库,同时自己在GitHub上面也创建了一个库,照着廖老师的教程一步一步走到了push的环节突然出现了这样的错误: [zhangxiyu@localhost le ...
- SSH方式登录github出现Permission denied (publickey)
今天在公司上传了代码,回到家pull,结果竟然出现了“Permission denied (publickey)“这种东西.第一反应是key不对,可是上次明明用key登录过,不可能不对啊,难道是文件被 ...
随机推荐
- winfrom向窗体中拖放图片并显示
首先要设置窗体的AllowDrop属性为true.然后在窗体的DragEnter事件中添加如下代码:调用自定义的显示图片的方法. #region "在用鼠标将某项拖放到区域时事件" ...
- Nginx下载防盗链(迅雷等下载软件)
什么是下载盗链 假设我们是一个B站,有些视频资源是可以提供给用户下载的.这时迅雷等其他下载软件,也提供下载该视频的服务, 但是迅雷很不厚道的,将我们的下载资源提供给他的用户,下载.占用我们的带宽来 ...
- 【sql】mysql数据库做两条数据替换的操作,不使用第三方变量
需求: 1.将数据库中两条数据中的唯一约束列 做值的替换 原始思想: 将两条数据查出来,在程序中设置第三方变量,进行两条数据的替换,然后将原始两条数据删除,将新的两条替换后的数据插入. 新思想: 1 ...
- Oracle API Gateway连接WebService服务,攻击保护
1.启动和连接OAG OAG连接的时候除了不选择analysis,其他都选上,然后启动Gateway实例以及Nodemanager. 命令如下: /$OAG_HOME/apigateway/posix ...
- nullptr 与 constexpr
nullptr nullptr出现的目的自然是替换NULL的低位.C++可能会将NULL.0视为同一种东西.这取决于编译器是如何定义的,有的编译器定义NULL为 ( (void * )0) ,有的 ...
- ubuntu14.04使用samba共享文件
samba是linux中常用的共享文件的软件 ubuntu12.04及以上版本中已经安装了samba 开始配置: samba配置文件: /etc/samba/smb.conf可以修改配置文件来设置sa ...
- Java笔记9:Spring简单Demo
1 下载spring-framework-3.0.5.RELEASE-with-docs.zip和spring-framework-3.0.5.RELEASE-dependencies.zip,放 ...
- FTP服务器需要开几个端口
原文: https://blog.csdn.net/houbin0912/article/details/72578688 -------------------------------------- ...
- linux下javadoc生成文件出现中文乱码
javadoc命令的正确使用姿势 javadoc -d apidoc -windowtitle Testing -doctitle 'The API of javadoc' -header 'My c ...
- selinux 是什么 (Linux)
SElinux是Linux安全加强工具.关闭用setenforce 0或者修改文件vim /etc/sysconfig/selinux 把SELINUX=enforcing 改为 SELINUX=di ...