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下安装golang
    go run/ go install/ go build / go get的区别
    git报错The authenticity of host 'github.com (13.229.188.59)' can't be established. RSA key fingerprint is。。。
    2. Java内存区域
    4. 垃圾回收- 4.1判断对象是否存活算法
    1. 各种虚拟机的发展历史
    springBoot多数据源(不同类型数据库)项目
    Linux shell脚本启动 停止 重启jar包
    IDEA云盘下载
    GitHub配置
  • 原文地址:https://www.cnblogs.com/illusion1010/p/11667069.html
Copyright © 2011-2022 走看看