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

  • 相关阅读:
    WebStorm 9 配置 Live Edit 功能与浏览器实现同步
    开源JS图片裁剪插件
    cropper手机使用实例
    Laravel中的Storage::disk
    laravel删除文件
    cropper.js移动端使用
    资本的一些运作规律及启示
    laravel文件存储、删除、移动等操作
    解决div和父div不上对齐
    ubuntu14.04如何卸载qq
  • 原文地址:https://www.cnblogs.com/illusion1010/p/11667069.html
Copyright © 2011-2022 走看看