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 ...
随机推荐
- Codeforces Round #365 (Div. 2) B
Description Little Mishka is a great traveller and she visited many countries. After thinking about ...
- 关于Spring @RequestBody 自动映射模型原理
关于Spring @RequestBody 自动映射模型 2016年10月18日 22:17:12 稻子丶 阅读数:5049 在很多时候,Spring的注解为我们提供了很多方便,但只知道其用法,不 ...
- 转 oracle数据仓库部署注意事项(OLAP)
https://blog.csdn.net/laven54/article/details/9840365 最近数据库升级到11G之后,出现一些问题,慢慢的开始发现一些需要总结的东西,每次心里都在想: ...
- 005 Longest Palindromic Substring 最长回文子串
Given a string s, find the longest palindromic substring in s. You may assume that the maximum lengt ...
- Ubuntu apt-get update中断的时候会出现一个错误导致不能再apt-get update
错误描述为:Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Un ...
- jquery checkbox点击选中,再点击取消选中
if(n==1){ if($("#abs1").is(':checked')){ $("#abs1").prop("checked",fal ...
- 从Flux到Redux详解单项数据流
从Flux到Redux是状态管理工具的演变过程,但两者还是有细微的区别的.但是最核心的都还是观察者模式的应用. 一.Flux 1. Flux的处理逻辑 通俗来讲,应用的状态被放到了store中,组件是 ...
- <checking for mysql_config not found>
php 5.3.29编译安装排错: ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --w ...
- SpringMVC核心技术---转发和重定向
@Controller public class Mycontroller { //转发 @RequestMapping("/adduser") public String add ...
- Java基础重点指南
Java基础重点指南 每个人都有自己的学习方法,下面是我学完Java后总结的一些要点: 一:(了解)Java诞生于1995年,由Sun公司开发.它把源代码编译成“中间码”,然后通过“Java虚拟机”把 ...