输入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. ionic基础知识

    ion-header-bar(头部 页眉) 在内容顶部添加一个固定header栏. 用法 <ion-header-bar align-title="left" class=& ...

  2. L2-3 名人堂与代金券 (25 分)

    #include<cstdio> #include<algorithm> #include<cstring> using namespace std; int N, ...

  3. android 微信 SDK 分享

    1.资源依赖: https://open.weixin.qq.com/cgi-bin/showdocument?action=doc&id=open1419319167&t=0.613 ...

  4. 论文阅读 | ExtremeNet:Bottom-up Object Detection by Grouping Extreme and Center Points

    相关链接 论文地址:https://arxiv.org/abs/1901.08043 论文代码:https://github.com/xingyizhou/ExtremeNet 概述 ExtremeN ...

  5. python计算π及进度条显示

    今天老师布置了一个课后作业,去尽可能的准确计算π的值,还要显示时间和进度条,对于python小白的我,当然是综合书上和网上的知识,自己做了一个小程序,代码如下: 一.写代码的准备工作:用pip下载第三 ...

  6. GoldenGate安装配置

    GOLDENGATE安装 1. 下载与数据库对应版本的goldengate安装介质. 2. 创建goldengate系统用户,设置用户环境变量,如果是oracle,建议直接使用oracle作为用户安装 ...

  7. CSAPP阅读笔记-汇编语言初探(控制类指令)-来自第三章3.6的笔记-P135-P163

    1.正溢出与负溢出: 首先,一个正数与一个负数相加,不可能溢出,因为结果的绝对值一定小于两个加数的绝对值,既然两个加数能合理表示出来,结果一定也能合理表示出来. 其次,正溢出是由于两个很大的正数相加, ...

  8. 使用autoconf完成编译配置

    使用过开源C/C++项目的同学们都知道,标准的编译过程已经变成了简单的三部曲:configure/make/make install, 使用起来很方便,不像平时自己写代码,要手写一堆复杂的Makefi ...

  9. Centos 7网卡设置

    #yum install net-tools.x86_64 #cd /etc/sysconfig/network-scripts/ #mv ifcfg-eno16780032 ifcfg-eth0 手 ...

  10. MySQL 查询结果分组 group by

    [group by {col_name | position} [ASC | DESC ]] 分组条件 [HAVING where_condition] HAVING 后面的条件必须出现在select ...