问题背景

换了台别人用过的电脑想要将文件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. flask_restful

    from flask_restful import (Resource, reqparse) # 参数解析对象生成 parser = reqparse.RequestParser() parser.a ...

  2. HDU_1028 Ignatius and the Princess III 【母函数的应用之整数拆分】

    题目: "Well, it seems the first problem is too easy. I will let you know how foolish you are late ...

  3. 109th LeetCode Weekly Contest Knight Dialer

    A chess knight can move as indicated in the chess diagram below:  .            This time, we place o ...

  4. POJ - 2018 二分+单调子段和

    依然是学习分析方法的一道题 求一个长度为n的序列中的一个平均值最大且长度不小于L的子段,输出最大平均值 最值问题可二分,从而转变为判定性问题:是否存在长度大于等于L且平均值大于等于mid的字段和 每个 ...

  5. 关于zipfile解压出现的字符编码问题

    使用zipfile解压文件时,出现了中文乱码问题,具体解决方法有两个,直接上代码吧. def deco_zip(path, file_path): os.mkdir(file_path) # 方式一 ...

  6. 2.Exadata 硬件体系结构

    Exadata 硬件加构: 高性能,低成本 冗余 线性扩展 ,具有超强性能,开箱即用         例 2-2的满配: 8台数据服务器组成(2C 6核) (3-2是10核, 4-2,5-2 是12核 ...

  7. 从零开始学Linux(11)--more

    more命令,是将文件的内容从上到下显示在屏幕上. more会以一页一页的显示方便使用者逐页阅读,而最基本的指令就是按空格键(space)就往下一页显示,按 b 键就会往回(back)一页显示,而且还 ...

  8. 切换myEclipse工作空间后设置,myEclipse添加注释/设置豆沙背景颜色/调节字体大小

    一.添加注释 操作位置: 注释规范 Files/** * @文件名称: ${file_name} * @文件路径: ${package_name} * @功能描述: ${todo} * @作者: ${ ...

  9. bind-named

    main-book: http://www.zytrax.com/books/dns resolv.conf: http://dns-learning.twnic.net.tw/bind/intro4 ...

  10. failed to push some refs to 'git@github.com:xxx/xxx.git' 解决方法

    此时很多人会尝试下面的命令把当前分支代码上传到master分支上. $ git push -u origin master 但依然没能解决问题 会出现: failed to push some ref ...