输入git push -u origin master时提示

Permission denied (publickey).

fatal: Could not read from remote repository.

解决方法:

ls -al ~/.ssh(查看系统中是否存在私钥和公钥,我的已经存在,只是名字是github_rsa.pub和github_rsa)

ssh-add ~/.ssh/github_rsa
关联私钥,我的是github_rsa(每个人的可能不一样)

要和远程仓库关联需要在远程添加公钥到列表,步骤如下

在setting页,选择SSH and GPG keys,

选择new SSH key添加,

需要上面找到的.ssh文件夹下的github_rsa.pub里面的内容(即公钥)

git push报错--私钥问题的更多相关文章

  1. git push报错error: failed to push some refs to 'git@github.com'

    git push报错error: failed to push some refs to 'git@github.com' $ git push -u origin master To git@git ...

  2. git push报错大文件,删除后重新commit依然报错

    git push报错: github不能上传大文件,按道理删掉重新提交就行了 可是删掉后,git add -A,再git commit,再git push,依然报错 后来我想明白了 github上传时 ...

  3. git push 报错

    git push报错误: Git push error: RPC failed; result=56, HTTP code = 200 fatal: The remote end hung up un ...

  4. 电脑修改密码后,git push 报错unable to access

    电脑修改密码后,git push 时报错 remote: Permission to xxx A. fatal: unable to access  解决这个问题有两种方法,一种是界面修改,一种是命令 ...

  5. git push 报错 "Peer certificate cannot be authenticated with known CA certificates"

    使用git push -u origin master 命令向远程仓库提交代码时报错:Peer certificate cannot be authenticated with known CA ce ...

  6. 解决git push报错error: failed to push some refs to 的问题

    这个问题发生的背景一般是: 想把自己本地的某个项目关联到远程仓库并推送上去,接着他会做如下操作: 本地项目->远程创建仓库->本地关联远程->推送最新代码 最后一个步骤发生问题: 那 ...

  7. git push 报错:missing Change-Id in commit message footer

    使用gerrit后,提交代码会出现如下截图问题: 临时解决: step1:把上面红色的那条gitidir复制下来执行下: step2:执行下面的命令会添加change_id git commit -- ...

  8. git push 报错:failed to push some refs to 'git@git.xxxx:devops/thor.git'

    error: failed to push some refs to 'git@git.caicaivip.com:devops/thor.git' hint: Updates were reject ...

  9. git push报错

    git: No refs in common and none specified; doing no (2012-10-28 11:43:10) 转载▼ 标签: 杂谈 分类: 项目管理 用gitol ...

随机推荐

  1. excel2010冻结行列

    https://jingyan.baidu.com/article/a24b33cd56f6bd19ff002b7c.html

  2. rinetd做代理!redis做代理使外网直接远程连接

    Centos7下Rinetd安装与应用   Linux下做地址NAT有很多种方法.比如haproxy.nginx的4层代理,linux自带的iptables等都能实现.haproxy.nginx就不说 ...

  3. dedicated bearer

    Session Initiation Protocol (SIP) Basic Call Flow ExamplesRFC3665 intuitive,   done. PDF] TS 123 401 ...

  4. Vivado 的IP:Global 和 Out-Of-Context选项问题

    在Vivado定制IP的时候,或者在IP Catalog中双击一个IP,不论该IP是我们自己添加到工程的自定义IP,还是Vivado自己带的IP,选择"Customize IP"后 ...

  5. Ubuntu16.04+Cuda8.0+cuDNN6配置py-faster rcnn(转)

    原博客地址:https://blog.csdn.net/meccaendless/article/details/79557162 0前言Faster R-CNN是任少卿2015年底推出的目标检测算法 ...

  6. Spring异常:Annotation-specified bean name.. for bean class ...

    Spring重命名问题.对照项目中的注解,查找@Service是否重重名.由于Spring是在注解下按配置扫描的方式去创建对象的,那么两个重名的注解也就不成立了. 备注,特别注意test包下有没有通过 ...

  7. openerp学习笔记 对象继承,对象初始化数据

    1.对象继承     _inherit = "product.product" 继承产品对象,给产品对象添加字段或方法,不需要设置 _name._table 等属性     注意: ...

  8. 自动化测试之旅--selenium+python--001

    在学习selenium之前,首先感谢网络上的虫师和乙醇老师,或许他们并不知道我这个菜鸟的存在,但是我仍然要感谢他们,因为在学习的路上拜读了许多他们的博客和文章,对于我来说有着很重要的意义,因此在学习之 ...

  9. Unity Github 项目收集

    http://gad.qq.com/article/detail/24048 重磅推荐: Github 热门 Unity Assets 查询:http://unitylist.com/browse 最 ...

  10. Mybatis多参数

    转载自:一杯甜酒 http://blog.csdn.net/u012562943/article/details/52316071 据我目前接触到的传多个参数的方案有三种.第一种方案 DAO层的函数方 ...