工具-github在linux下面没有git push报错

time: 2015/12/25

1. 描述:

  error: The requested URL returned error: 403 Forbidden while accessing https://github.com ...

2. 吐槽:

  在网上随便一搜一大堆的都是各种拷贝,说把.git/config下面的["origin"]下面的url改一下,如下所示

[remote "origin"]
    url = https://github.com/username/example.git  
[remote "origin"]
    url = https://[email protected]/username/example.git  

  结果,没啥鸟用,最后还是在stack overflow上面的问题上解决了。如果跟我一样上面方法不能解决问题的,可以看看下面的解决办法是否可用...

3. 原因:

(1)参考[1]中投票最多(目前为止是475票支持)说:虽然显示https支持读写,github似乎仅仅只支持ssh读写.这个github还是支持https的,因为我两台linux,一台一开始配置的是https,而另外一台是ssh,都是可以读写的。那自己猜测不支持https的是不是github版本控制,现在这台出问题的是一开始配置的ssh,版本是1.7.1。另外一台,打开了再看一下

4. 解决

(1)https不支持,又想起来自己一开始设置的就是ssh,所以把上面的["origin"]的url一行改为:

url = ssh://[email protected]/username/Study.git

结果报错!说什么rsa密钥的问题啊之类的

ERROR: We‘re doing an SSH key audit.
Reason: unverified due to lack of use
Please visit https://github.com/settings/ssh/ ...
to approve this key so we know it‘s safe.
Fingerprint: ... ...
fatal: The remote end hung up unexpectedly

(2)参考[2]打开到github,看一下rsa公钥的问题,结果看到自己sshkeys那里的最右边一个按钮就是approve,点了一下就ok了。

(3)重新提交,binggo!
5. 总结

(1)国内网站各种问题解决各种坑爹

(2)在百度如果没搜到解决办法,或者一大批雷解决办法无效的时候,去stack overflow上面搜一下

6. 参考

[1]http://stackoverflow.com/questions/7438313/pushing-to-git-returning-error-code-403-fatal-http-request-failed#

[2]http://stackoverflow.com/questions/19722521/error-the-requested-url-returned-error-403-forbidden-while-accessing

时间: 2024-10-11 01:07:41

工具-github在linux下面没有git push报错的相关文章

<问题解决02>Linux虚拟机使用git push报错--解决方案如下:

问题描述: 使用git push 报错: error: The requested URL returned error: 403 Forbidden while accessing https://github.com/Newlyfly/Hello_World.git/info/refs fatal: HTTP request failed 解决方案: 解决方案来源博客地址:http://blog.csdn.net/happyteafriends/article/details/1155404

git push报错error: failed to push some refs to '[email protected]:

$ git push -u origin master To [email protected]:xxx/xxx.git ! [rejected] master -> master (fetch first) error: failed to push some refs to '[email protected]:xxx/xxx.git' hint: Updates were rejected because the remote contains work that you do hint:

git push 报错:failed to push some refs to '[email protected]:devops/thor.git'

error: failed to push some refs to '[email protected]:devops/thor.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing

git push 报错

git push报错误: Git push error: RPC failed; result=56, HTTP code = 200 fatal: The remote end hung up unexpectedly fatal 从stackoverflow 找到的答案,解决问题 http://stackoverflow.com/questions/15240815/git-fatal-the-remote-end-hung-up-unexpectedly http://stackoverf

mac系统idea开发工具git -push 报错:no matching host key type found. Their offer: ssh-dss

原因: 根本原因之所以报错是因为OpenSSH7.0以后的版本不再支持ssh-dss(DSA)算法,官方的说法是这个算法太弱了.MACOS升到10.12附带的openssh版本是7.4,如下:?~sshd-Vsshd:illegaloption--VOpenSSH_7 解决方案: 命令行里添加选项 ssh -oHostKeyAlgorithms=+ssh-dss [email protected] 添加 HostKeyAlgorithms +ssh-dss到配置 ~/.ssh/config 原文

Git push 报错 "error: failed to push some refs to " 解决

之前一直好好地啊,google后,发现是由于远程仓库中代码版本与本地不一致冲突导致的. 突然想起来,确实我在云端直接改过README,解决方法,先pull,再push,然而这时候又出现了新的问题, error: Your local changes to the following files would be overwritten by merge: Please, commit your changes or stash them before you can merge. 这时候我想用云

git push报错:error: RPC failed; result=22, HTTP code = 413

新项目推送到服务器时报错: error: RPC failed; result=22, HTTP code = 413| 7.66 MiB/s    fatal: The remote end hung up unexpectedly 查了下,属于项目中有大文件,而http推送限制造成的,需要修改服务器配置.因为git服务器是通过nginx做反向代理之后实现的,因此需要修改nginx和appache(git服务器): 1.nginx服务器配置:/etc/nginx/conf.d/default.

git提交报错SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

git push报错 git push origin master [email protected] /e/git/ouyida3/ouyida3.github.io (master) $ git push origin master fatal: unable to access 'https://github.com/ouyida3/ouyida3.github.io.git/': err or:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tl

linux下编译make文件报错“/bin/bash^M: 坏的解释器,使用grep快速定位代码位置

一.linux下编译make文件报错"/bin/bash^M: 坏的解释器 参考文章:http://blog.csdn.net/liuqiyao_01/article/details/41542101#comments 自己测试的结果: [1]使用windows 下的编辑工具 新建文件doc2unix.sh #!/usr/bin/env bash # test PID=$(ps -aef | grep nginx | grep -v grep | grep master |awk '{print