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://wangz@github.com/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://git@github.com/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

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

  1. git push报错error: failed to push some refs to 'git@github.com'

    git push报错error: failed to push some refs to 'git@github.com' $ git push -u origin master To git@git ...

  2. git push报错大文件,删除后重新commit依然报错

    git push报错: github不能上传大文件,按道理删掉重新提交就行了 可是删掉后,git add -A,再git commit,再git push,依然报错 后来我想明白了 github上传时 ...

  3. git push 报错

    git push报错误: Git push error: RPC failed; result=56, HTTP code = 200 fatal: The remote end hung up un ...

  4. 电脑修改密码后,git push 报错unable to access

    电脑修改密码后,git push 时报错 remote: Permission to xxx A. fatal: unable to access  解决这个问题有两种方法,一种是界面修改,一种是命令 ...

  5. 由于github仓库中提前建立readme文件,导致git push报错error: failed to push some refs to 'git@github.com:

    $ git push -u origin master To git@github.com:xxx/xxx.git ! [rejected] master -> master (fetch fi ...

  6. GitHub 在使用命令行 git push 时报错:The requested URL returned error: 403

    使用 git 的命令行向 GitHub 提交的时候,报错: [Young@localhost OtherLang]$ git push origin master error: The request ...

  7. linux 下解决git clone报错

    解决报错:error: The requested URL returned error: 401 Unauthorized while accessing   问题报错:error: The req ...

  8. 解决git push报错error: failed to push some refs to 的问题

    这个问题发生的背景一般是: 想把自己本地的某个项目关联到远程仓库并推送上去,接着他会做如下操作: 本地项目->远程创建仓库->本地关联远程->推送最新代码 最后一个步骤发生问题: 那 ...

  9. git push报错

    git: No refs in common and none specified; doing no (2012-10-28 11:43:10) 转载▼ 标签: 杂谈 分类: 项目管理 用gitol ...

随机推荐

  1. yum命令速查

    1 yum的基本原理 CentOS可在yum服务器上下载官方网站给出的rpm给出的表头列表数据,该数据除了记载每个rpm软件的相依性之外,也说明了rpm所放置的容器(repository)所在.通过分 ...

  2. Asterist搭建步骤

    环境: # cat /proc/version Linux version 2.6.18-308.el5 (mockbuild@x86-010.build.bos.redhat.com) (gcc v ...

  3. [转]ORA-28001: the password has expired解决方法

    本文转自:http://blog.csdn.net/btt2013/article/details/54862420 参考文献:http://www.zhetao.com/content259 后台报 ...

  4. [转]ASP.NET Core配置环境变量和启动设置

    本文转自:https://www.cnblogs.com/tdfblog/p/Environments-LaunchSettings-in-Asp-Net-Core.html 在这一部分内容中,我们来 ...

  5. dev的控件放在没有runat="server"的标签中,回调出现的问题

    dev的控件放在没有runat="server"的标签中,第一次回调是会刷新页面, 有runat="server"时不会刷新页面

  6. c#Image.FromFile图形加载异常处理

    public void UpdateImg(string picpath) { //更新至控件中 PnlImageShow.BackgroundImage = LoadImgPath(picpath) ...

  7. .net core 2.2 部署CentOS7(4)CentOS7下载并安装.NET SDK(软件开发工具包)

    目录: .net core 2.2 部署CentOS7(1)安装虚拟机 .net core 2.2 部署CentOS7(2)给虚拟机安装CentOS7 .net core 2.2 部署CentOS7( ...

  8. 并发编程之ThreadLocal源码分析

    当访问共享的可变数据时,通常需要使用同步.一种避免同步的方式就是不共享数据,仅在单线程内部访问数据,就不需要同步.该技术称之为线程封闭. 当数据封装到线程内部,即使该数据不是线程安全的,也会实现自动线 ...

  9. MySQL 中文未正常显示

    关于MySQL中文乱码问题 最近发现,在MySQL的dos客户端输出窗口中查询表中的数据时,表中的中文数据都显示成乱码: 之所以会显示乱码,就是因为MySQL客户端输出窗口显示中文时使用的字符编码不对 ...

  10. LeetCode CombinationSum II

    class Solution { public: vector<vector<int> > combinationSum2(vector<int> &num ...