在今天的上传过程中,我意外地遇到了一个问题,,每一次push都会出现

$ git push origin master
Permission denied (publickey).
fatal: Could not read from remote repository. Please make sure you have the correct access rights
and the repository exists.

大致意思就是我登不上自己的账户了?(发生了什么???)

冷静分析,全部和以往的处理方式一样

git init 建立仓库, add 添加 , commit 提交, 然后remote add 添加远程仓库位置

就在我觉得万无一失之时,出来这么个神奇问题

内事不决问百度,在经由度娘后了解了一种方法

重置公钥, 首先,将你原本的.ssh文件取出(就是你曾经放公钥的地方)

(提示:windows默认放在user(<在文件管理器中文显示为用户>)文件夹下的 ****(你的微软账户)里,认真找出 .shh 文件夹,如果乱放了,可以百度一下命令行删除方式)

然后 备份, 删除

然后,在gitbash输入

ssh-keygen -t rsa

一路三次回车(默认位置如上,密码为空,再次输入为空)

然后你发现又出来了, .shh文件夹,然后熟悉的id_rsa.pub公钥

然后按照http://www.cnblogs.com/Phoenix-blog/p/7748314.html 里的方法重新弄一遍

至此,为了验证连接正常,输入

ssh git@github.com

然后服务器回答我

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

RSA key fingerprint is **************************************** Are you sure you want to continue connecting (yes/no)? y //输入了一个yes,打星号是一些私人信息的文字,字数不一定对 
Please type 'yes' or 'no': yes
Warning: Permanently added 'github.com,*********' (RSA) to the list of known hosts. PTY allocation request failed on channel 0 Hi ******! You've successfully authenticated, but GitHub does not provide shell access. Connection to github.com closed.

嗯,完美,然后,再次,push

what??? 还是不行

于是,我开始查看另一些详细信息,输入

cat .git/config

然后发现一个严重问题。我的url多打了一个git。。。 用命令

git remote rm origin
git remote add origin ********(远程仓库位置)

换了回来,果然成了, 应了git官方文档的话

打字真的累,我们都知道,但是别打错了。。。。。。

附文档出处:https://help.github.com/articles/error-permission-denied-publickey/#platform-windows

git bash 学习2 --更改url 重置密钥 Permission denied (publickey)问题的更多相关文章

  1. Git使用SSH提交代码到server出现 permission denied (publickey).

    在GitBush中向已经存在的Repository提交README.md改动. 命令例如以下: touch README.md git init git add README.md git commi ...

  2. git克隆出错 github clone Permission denied (publickey) fatal Could not read from remote repo

    原文网址:http://blog.csdn.net/feeling450/article/details/53067563 github clone "Permission denied ( ...

  3. Git报错:Permission denied (publickey)

    Git在克隆的时候报错.Permission denied (publickey). 报错 Permission denied (publickey) 具体如下: 原因:没有将自己的电脑的SSH ke ...

  4. Git push提交时报错Permission denied(publickey)...Please make sure you have the correct access rights and the repository exists.

    一.git push origin master 时出错 错误信息为: Permission denied(publickey). fatal: Could not read from remote ...

  5. 解决方案 git@github.com出现Permission denied (publickey)

     ubentu 13.10 git version 1.8.3.2 解决方案:ssh -T git@github.com出现Permission denied (publickey).的问题 今天的任 ...

  6. git连接报错:Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)

    在Linux上已经安装过git(自己搭建)了,本机(windows)想连接过去,通过git bash敲了下clone命令提示没权限: $ git clone git@111.11.111.11:cod ...

  7. 【ASK】git使用中出现Permission denied (publickey).

    好久没有用git了,今天突然执行了一下 $git submodule update --init --recursive =============================== 结果出现如下提 ...

  8. git push是报Permission denied (publickey)错误解决

    今天晕了半天了,搞了个git工程到github上,以为很简单,因为之前也弄过,那知道搞了大半天都搞不好,一直报如下错误 D:\javawork\ee-0.0.1-SNAPSHOT>git pus ...

  9. github:当你想要使用VSCODE开心提交代码时,出现Git:git@github.com:Permission denied(publickey)解决方案

    当你想要使用VSCODE开心提交代码时,出现Git:git@github.com:Permission denied(publickey)弹框 图片: 原因:电脑公钥(publickey)未添加至gi ...

随机推荐

  1. MD5Utils

    import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import com.yundae ...

  2. Hadoop_配置Hadoop开发环境(Eclipse)

    通常我们可以用Eclipse作为Hadoop程序的开发平台. 1)  下载Eclipse 下载地址:http://www.eclipse.org/downloads/ 根据操作系统类型,选择合适的版本 ...

  3. html 页面跳转方式

    网页的跳转在很多时候都非常的有用,下面的是两个简单的例子.仅供参考. 一.用<meta>里直接写刷新语句:5秒后跳转到百度 <html> <head> <me ...

  4. ThreadPoolExecutor线程池的keepAliveTime

    keepAliveTime含义 看了很多文章觉得都不能把keepAliveTime的意思说的很明白,希望通过自己的理解把keepAliveTime说的明确一些 先引用一句我觉得相对说的比较明白的含义: ...

  5. 寻找jar包的方法

    在项目开发中经常会遇到资源jar查找难的问题,一种使用maven ,另一种方法是: (1).使用下载地址:https://oss.sonatype.org/content/repositories/r ...

  6. java实现发送邮件工具

    java实现发送邮件的功能:首先需要导入mail.jar: 然后需要写发送方法: 1.邮箱发送封装工具类: package com.wxjiameng.utils; import java.util. ...

  7. java数据结构和算法07(2-3-4树)

    上一篇我们大概了解了红黑树到底是个什么鬼,这篇我们可以看看另外一种树-----2-3-4树,看这个树的名字就觉得很奇怪.... 我们首先要知道这里的2.3.4指的是任意一个节点拥有的子节点个数,所以我 ...

  8. 【Python】python2 str 编码检测

    python2 str 编码检测 import chardet s = 'sdffdfd' print type(s) print chardet.detect(s) s2 = '反反复复' prin ...

  9. C# sftp通过秘钥上传下载

    一.适用场景 我们平时习惯了使用ftp来上传下载文件,尤其是很多Linux环境下,我们一般都会通过第三方的SSH工具连接到Linux,但是当我们需要传输文件到Linux服务器当中,很多人习惯用ftp来 ...

  10. windows10下git报错warning: LF will be replaced by CRLF in readme.txt. The file will have its original line endings in your working directory.

    window10下使用git时 报错如下: $ git add readme.txtwarning: LF will be replaced by CRLF in readme.txt.The fil ...