问题背景

换了台别人用过的电脑想要将文件push到github上,出现下面报错

remote: Permission to *****(我的)/gittest.git denied to *****(另一个人的)

git not exist cleanly (exit code 128)

解决方法

一、SSH Keys公钥没有配置

1.进入git bash 输入cat ~/.ssh/id_rsa.pub 命令查看ssh是否是自己的,不是说明SSH有问题

2.有问题的话就将.ssh文件目录删除,该目录一般放在c盘的用户目录下面,C:\Users\(用户)\.ssh

  3.再输入 cat ~/.ssh/id_rsa.pub命令 出现No such file or directory 说明删除成功

  4.重新创建ssh  ssh-keygen -t rsa -C "your_email@example.com“ 下面敲回车就行了

5.取得公钥在.ssh的文件里面的id_rsa.pub的内容,找到你的github—下面的setting找到以下,title可以随意写,key写id_rsa.pub的内容

  

  

二、查看连接

ssh -T git@github.com 连不上但是如上图所示输入两次以后

AL@AL-WORK MINGW64 ~/Desktop
$ ssh -T git@github.com

Hi *******(我自己的用户)! You've successfully authenticated, but GitHub does not provide shell access.

就连上了。

之后进行push操作

一般这个时候就应该push成功了,但是还是报原来的错连接不上。。。

如果你这个时候还是连不上的话可以试试修改管理凭证,将原来的git凭证删除掉(如果有的话)

以上操作之后push成功

GitHub无法push的问题的更多相关文章

  1. git向gitHub上push和pull数据.

    1.在gitHub上首先建立仓储.这个过程就不在啰嗦了. 2.注意上图中右下角的https,ssh等东西. 3.向git上传的工具特别多.我这里用的cygwin. 至于cygwin自己到网上去下载.安 ...

  2. github每次push都需要密码以及用户名的解决办法

    git remote set-url origin git@github.com:你的账户/项目名称.git就可以直接git push origin master了.

  3. [git/GitHub] git push 时报错:fatal: remote error: You can't push to git://github.com/user/xxx.git(已解决)

    当使用  git push  时,提示以下错误: fatal: remote error: You can't push to git://github.com/user/xxx.git Use ht ...

  4. [GitHub] git push的时候报错 fatal: unable to access 'http://github.com/xxx/xxx.git/': Recv failure: Connection reset by peer

    参考了两种方法: 1. 解决fatal: unable to connect to github.com问题 http://blog.csdn.net/greenqingqingws/article/ ...

  5. github每次push提交都要输入账号密码

    问题产生的原因是在克隆的时候使用的是https的方式或者用一些特殊的指令来克隆的github项目源,如 golang里的go get github.com/...... 没次提交push的时候都会提示 ...

  6. 向github项目push代码后,Jenkins实现其自动构建

    配置Jenkins(添加Github服务器) 1.进入[系统管理] --> [系统设置] ,找到[Github] 2.添加Github服务器 这里需要github提供一个密钥文本,我们去gith ...

  7. 解决git每次输入密码,设置gitlab、github默认push的用户名和密码

    git ssh key配置&解决git每次输入密码   欢迎加入qq群(IT-程序猿-技术交流群):757345416 在使用git时,每次pull/push都需要输入密码,有时大大降低了我们 ...

  8. 初次配置git与github出现push不了的问题

    ssh: connect to host gmail.com port 22: No route to host fatal: Could not read from remote repositor ...

  9. 用Tortoisegit往GitHub上push时,失败并显示git did not exit cleanly (exit code 1),可能是GitHub的Email的原因

    之前我看到错误,总是没有耐心地读完整个错误,而是不假思索地搜索一部分错误,导致偏离正确轨道,相当于号错脉了,比如这里只是搜索git did not exit cleanly (exit code 1) ...

随机推荐

  1. 查找表,Two Sum,15. 3Sum,18. 4Sum,16 3Sum Closest,149 Max points on line

    Two Sum: 解法一:排序后使用双索引对撞:O(nlogn)+O(n) = O(nlogn) , 但是返回的是排序前的指针. 解法二:查找表.将所有元素放入查找表, 之后对于每一个元素a,查找 t ...

  2. 167 Two Sum-Input array is sorted, 125 Valid Palindrome,344

    注意这两个元素不能是相同的. 解法一:二分查找法,逐一取数组中的值,然后second = target - numbers[i] , 用二分查找法求第二个值. 时间复杂度:O(nlongn) clas ...

  3. 基于PHPExcel的常用方法总结

    // 通常PHPExcel对象有两种实例化的方式// 1. 通过new关键字创建空白文档$phpexcel = newPHPExcel();// 2. 通过读取已有的模板创建$phpexcel =PH ...

  4. 深入剖析PHP输入流 php://input

    另附一个一个连接: http://www.nowamagic.net/academy/detail/12220520 ///////////////////////////////////////// ...

  5. OPENROWSET read excel

    由于64位系统已经不支持 oledb 4.0访问 xls 1. 未在本地计算机上注册“microsoft.ACE.oledb.12.0”提供程序 去http://download.microsoft. ...

  6. <th>折行显示

    设置了一些框架的样式导致折行显示失效,解决办法: https://jingyan.baidu.com/article/3a2f7c2e24cd1826afd611e7.html

  7. (转)expfilt 命令

    expfilt 命令 原文:https://www.ibm.com/support/knowledgecenter/zh/ssw_aix_72/com.ibm.aix.cmds2/expfilt.ht ...

  8. webservice 介绍

    Web service 即web服务,它是一种跨编程语言和跨操作系统平台的远程调用技术即跨平台远程调用技术. l 采用标准SOAP(Simple Object Access Protocol)  协议 ...

  9. 案例40-层与层之间的解耦(面向接口编程)BeanFactory

    1 bean.xml配置文件 <?xml version="1.0" encoding="UTF-8"?> <beans> <!- ...

  10. nodejs日志管理log4js

    常用的2种配置: 1.按文件大小分片,备份若干数量的文件 var log4js = require('log4js'); log4js.configure({ "appenders" ...