zoukankan      html  css  js  c++  java
  • git push时提示The authenticity of host 'github.com (52.74.223.119)' can't be established.

    问题现象:

    github上创建了一个远程仓库,将我的代码推送到远程仓库git push -u origin master时,出现下面报错

     

    The authenticity of host 'github.com (52.74.223.119)' can't be established.

    RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.

    Are you sure you want to continue connecting (yes/no)? yes

    Warning: Permanently added 'github.com,52.74.223.119' (RSA) to the list of known hosts.

    git@github.com: Permission denied (publickey).

    fatal: Could not read from remote repository.

    问题原因:Github与ssh连接需要密钥

    解决方法:

    1.本地mac 公钥路径取密钥:cd ~/.ssh  (id_rsa.pub

    2. 登录自己的github进入项目的存储库----进入setting----部署秘钥(Deploy keys)

    3.配置ssh key的时候勾选下面的Allow write access,在settings的deploy key栏目才有读写权限

    4.配置完成之后再去项目中操作git即可

    解决结果:

    git push -u origin master

    Enumerating objects: 3, done.

    Counting objects: 100% (3/3), done.

    Writing objects: 100% (3/3), 218 bytes | 109.00 KiB/s, done.

    Total 3 (delta 0), reused 0 (delta 0)

    To git+ssh://github.com/illusion1010/Hog.git

     * [new branch]      master -> master

    Branch 'master' set up to track remote branch 'master' from 'origin'.

  • 相关阅读:
    Mac 下安装Ant
    MAMP 10.10下启动报错解决方案
    [转]常用iOS图片处理方法
    Mac下Android SDK更新不了的解决办法
    细说23+1种设计模式
    mysql应该了解的知识点
    java快排思想
    简介一下 i++和++i&&i=i+i,i+=1;的区别
    对int类型的数据,如何让获取长度
    第一次写博客
  • 原文地址:https://www.cnblogs.com/illusion1010/p/11667069.html
Copyright © 2011-2022 走看看