zoukankan      html  css  js  c++  java
  • 输入git push -u origin master命令出现Please make sure you have the correct access rights and the repository exists

    问题:

      有一段时间没有用码云了,当输入 git push -u origin master命令出现Please make sure you have the correct access rights and the repository exists.错误,

    原因:

      是git服务器没有发现存储本地的ssh密钥。(git服务器已经存在我电脑的ssh秘钥)

    解决方案:

      总思路:重新生成新的 ssh秘钥,再把新的秘钥添加到git服务器的ssh公钥上。

      解决问题步骤:

        1. 删除 .ssh 文件夹【C:Users(本地用户名).ssh】 中的 known_hosts(手动删除即可),

        2. 在下载好的Git中的bin目录下(一般是 C:Program FilesGitin)打开bash.exe输入命令ssh-keygen -t rsa -C "username" (注:username为你git上的用户名),

        3. 出现 Enter file in which to save the key (/Users/username/.ssh/id_rsa):  //按回车

        4. 返回/Users/your username/.ssh/id_rsa already exists.Overwrite (y/n)?  //如果以前有存储地址输入y回车

        5. Enter passphrase(empty for no passphrase): //如果以前没有储存地址就会出现这个,直接回车就好

        6. 运行完成时:用户名/.ssh/id_rsa.pub.(C:Users用户名.ssh)中发现,已经新生成了id_rsa和id_rsa.pub两个文件

           7. 打开id_rsa.pub将全部的内容复制,到 git服务器的 “设置”  >  “安全设置”  >  “ssh公钥”

           8. 重新运行命令行就可以正常了。

  • 相关阅读:
    IDEA的database插件无法链接mysql的解决办法(08001错误)
    window.location.href传参/传值汇总
    toggleClass() 方法
    File file=new File ()
    MultipartFile接口
    @RequestParam注解字参数详解
    在微信下载的浏览器判断问题
    JS可控制的图片自动循环播放查看效果
    PHP接口的声明与引用
    js时间
  • 原文地址:https://www.cnblogs.com/yzg-14/p/14280088.html
Copyright © 2011-2022 走看看