git bash 学习2 --更改url 重置密钥 Permission denied (publickey)问题
在今天的上传过程中,我意外地遇到了一个问题,,每一次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)问题的更多相关文章
- Git使用SSH提交代码到server出现 permission denied (publickey).
在GitBush中向已经存在的Repository提交README.md改动. 命令例如以下: touch README.md git init git add README.md git commi ...
- 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 ( ...
- Git报错:Permission denied (publickey)
Git在克隆的时候报错.Permission denied (publickey). 报错 Permission denied (publickey) 具体如下: 原因:没有将自己的电脑的SSH ke ...
- 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 ...
- 解决方案 git@github.com出现Permission denied (publickey)
ubentu 13.10 git version 1.8.3.2 解决方案:ssh -T git@github.com出现Permission denied (publickey).的问题 今天的任 ...
- git连接报错:Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)
在Linux上已经安装过git(自己搭建)了,本机(windows)想连接过去,通过git bash敲了下clone命令提示没权限: $ git clone git@111.11.111.11:cod ...
- 【ASK】git使用中出现Permission denied (publickey).
好久没有用git了,今天突然执行了一下 $git submodule update --init --recursive =============================== 结果出现如下提 ...
- git push是报Permission denied (publickey)错误解决
今天晕了半天了,搞了个git工程到github上,以为很简单,因为之前也弄过,那知道搞了大半天都搞不好,一直报如下错误 D:\javawork\ee-0.0.1-SNAPSHOT>git pus ...
- github:当你想要使用VSCODE开心提交代码时,出现Git:git@github.com:Permission denied(publickey)解决方案
当你想要使用VSCODE开心提交代码时,出现Git:git@github.com:Permission denied(publickey)弹框 图片: 原因:电脑公钥(publickey)未添加至gi ...
随机推荐
- 实现一个类似bootstrap的多级下拉菜单
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- E. Beautiful Subarrays 字典树
http://codeforces.com/contest/665/problem/E 给定一个序列,问其中有多少个区间,所有数字异或起来 >= k 看到异或,就应该想到异或的性质,A^B^B ...
- Spring自动注入有关的注解
Spring不但支持自己定义的@Autowired注解,还支持几个由JSR-250规范定义的注解,它们分别是@Resource.@PostConstruct以及@PreDestroy. 1,@Comp ...
- HDU 5496——Beauty of Sequence——————【考虑局部】
Beauty of Sequence Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Other ...
- MySQL三种存储引擎总结
MySQL三种存储引擎 MyISAM.InnoDB.MEMORY 1.MyISAM MyISAM,3.23.34a前的默认存储引擎. 优缺点 优点 在于占用空间小,处理速度快. 缺点 不支持事务的完整 ...
- 微信支付配置参数:支付授权目录、回调支付URL
一.开通微信支付的首要条件是:认证服务号或政府媒体类认证订阅号(一般认证订阅号无法申请微信支付) 二.微信支付分为老版支付和新版支付,除了较早期申请的用户为老版支付,现均为新版微信支付. 三.公众平台 ...
- wcf_消息通信模式(下) 双工通讯
原文:[老老实实学WCF] 第十篇 消息通信模式(下) 双工 第十篇 消息通信模式(下) 双工 在前一篇的学习中,我们了解了单向和请求/应答这两种消息通信模式.我们知道可以通过配置操作协定的IsOne ...
- 在spark2中的shell使用python3
在spark2中的shell使用python3 spark2.0.0中的python默认使用python2,可以通过以下两种方式之一使用python3: PYSPARK_PYTHON=python3 ...
- echarts使用中的那些事儿(一)
近来由于有几个小项目要用到echarts里的一些图,不得不使用,可是要完全按照自己的意愿来,要对它有些了解,要翻阅资料,遂有以下小结: 1.最开始第一步是把数据调出来就行,能在图上显示就成,以下是最开 ...
- 微信小程序:从本地相册选择图片或使用相机拍照。
wx.chooseImage(OBJECT) 从本地相册选择图片或使用相机拍照. OBJECT参数说明: 示例代码: wx.chooseImage({ count: 1, // 默认9 sizeTyp ...