第一次提交遇到这样的情况,怎么回事呢,我在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的更多相关文章

  1. github Permission denied (publickey). fatal: Could not read from remote repository.

    github Permission denied (publickey).fatal: Could not read from remote repository. ----------------- ...

  2. 【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 ...

  3. 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 ...

  4. github下载报错:Permission denied (publickey). fatal: Could not read from remote repository.

    Permission denied (publickey). fatal: Could not read from remote repository. 博主在github上下载tiny face的的 ...

  5. Permission denied (publickey). fatal: Could not read from remote repository.

    博主在github上下载tiny face的的源代码的时候,遇到git clone命令为:git clone --recursive git@github.com:peiyunh/tiny.git 而 ...

  6. 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去测试一下 图上可以明显看出缺少了 ...

  7. 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 ( ...

  8. Permission denied (publickey). fatal: The remote end hung up unexpectedly 解决办法

    这两天学习git的时候,在本地创建了一个库,同时自己在GitHub上面也创建了一个库,照着廖老师的教程一步一步走到了push的环节突然出现了这样的错误: [zhangxiyu@localhost le ...

  9. SSH方式登录github出现Permission denied (publickey)

    今天在公司上传了代码,回到家pull,结果竟然出现了“Permission denied (publickey)“这种东西.第一反应是key不对,可是上次明明用key登录过,不可能不对啊,难道是文件被 ...

随机推荐

  1. 针对标签中设置 disabled="true",$("#id").serialize()获取不到value的解决方法

    今天给<select>增加disabled="true", 发现$("#form").serialize()的结果不包含select标签的值,解决办 ...

  2. LibreOffice创建数据透视表

    LibreOffice创建数据透视表 LibreOffice: 选中数据,Data->Pivot Table->Create,拖拽行.列到Row和column,Data Filed要点击O ...

  3. Widows 注册表 HKEY_CLASSES_ROOT

    Widows 注册表 HKEY_CLASSES_ROOT在此关键字之下,可以看到有一个CLSID关键字.在CLSID关键字之下列有系统中安装的所有组件的CLSID.注册表CLSID是一个具有如下格式的 ...

  4. [Functional Programming] Combine Multiple State ADT Instances with the Same Input (converge(liftA2(constant)))

    When combining multiple State ADT instances that depend on the same input, using chain can become qu ...

  5. java基础知识汇总4

    三.集合(collection.set.list.map) 一.定义: 集合是Java里面最经常使用的,也是最重要的一部分.可以用好集合和理解好集合对于做Java程序的开发拥有无比的优点. 容器:用来 ...

  6. 使用Python发送电子邮件

    使用python发送邮件并不难,这里使用的是SMTP协议. Python标准库中内置了smtplib,使用它发送邮件只需提供邮件内容与发送者的凭证即可. 代码如下: # coding:utf-8 im ...

  7. lodash kebabCase

    _.kebabCase([string='']) 转换字符串为 kebab case. _.kebabCase('Foo Bar'); // => 'foo-bar' _.kebabCase(' ...

  8. 图解avaScript中this指向(超透彻)

    一个图讲清楚JavaScript中this指向: 说明: (1)严格模式下,禁止this关键字指向全局对象会报错. (2)闭包中的this对象具有全局性,因此通常指向window.  (3)优先级:n ...

  9. CentOS 7上安装Zabbix(高速安装监控工具Zabbix)

    前提要求(optional) 安装Zabbix监控工具前,先安装必要的执行工具包 yum install gcc gcc-c++ make openssl-devel curl wget net-sn ...

  10. AspectJ 是什么

    http://www.blogjava.net/hwpok/archive/2008/06/28/211312.html 1. 序 Aspect Oriented Programming (AOP)是 ...