在今天的上传过程中,我意外地遇到了一个问题,,每一次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. 洛谷P4891 序列 || 膜法阵,魔法阵

    https://www.luogu.org/problemnew/show/P4891 一道几乎一样的题http://210.33.19.103/contest/1130/problem/3 题面ht ...

  2. C数据结构与算法-算法复杂度

    算法复杂度分为时间复杂度T(n)和空间复杂度F(n) 时间复杂度:也就是执行算法程序所需的时间,与硬件的速度.编程语言的级别.编译器的优化.数据的规模.执行的频度有关,前三个有很大的不确定性,所以衡量 ...

  3. postman将上一个请求的结果作为下一个请求的数据

    需要在Tests中写入如下代码: var jsonData = JSON.parse(responseBody); postman.setGlobalVariable("token" ...

  4. #define 只是字符替换

    可以使用 #define MAX 100 int main (int argc, char *argv[]) { printf("MAX is %d\n", MAX); ; } g ...

  5. 【Linux】linux压缩和解压缩命令大全

    tar命令 解包:tar zxvf FileName.tar 打包:tar czvf FileName.tar DirName gz命令 解压1:gunzip FileName.gz 解压2:gzip ...

  6. 【JavaEE】Web Service 的工作原理

    Web Service基本概念 Web Service也叫XML Web Service WebService是一种可以接收从Internet或者Intranet上的其它系统中传递过来的请求,轻量级的 ...

  7. java打印堆栈信息

    StackTraceElement[] stackElements = new Throwable().getStackTrace(); if(stackElements != null){ for( ...

  8. Go 微服务实践

    http://www.open-open.com/lib/view/open1473391214741.html

  9. ssm(Spring、Springmvc、Mybatis)实战之淘淘商城-第十天(非原创)

    文章大纲 一.课程介绍二.单点登录系统分析三.单点登录系统代码实战四.项目源码与资料下载五.参考文章   一.课程介绍 一共14天课程(1)第一天:电商行业的背景.淘淘商城的介绍.搭建项目工程.Svn ...

  10. Vue通过状态为页面切换添加loading、为ajax加载添加loading

    以下方法需要引入vuex,另使用了vux的UI框架,ajax添加loading还引入了axios. 一.为页面切换添加loading. loading.js: import Vue from 'vue ...