zoukankan      html  css  js  c++  java
  • 工具-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://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

  • 相关阅读:
    SQLException:The server time zone
    Golang开发环境和环境变量搭建
    Docker Swanm集群配置
    .net 批量导出文件,以ZIP压缩方式导出
    【旧文章搬运】Windows句柄表分配算法分析(实验部分)
    【旧文章搬运】Windows句柄表分配算法分析(三)
    【旧文章搬运】Windows句柄表分配算法分析(二)
    【旧文章搬运】Windows句柄表分配算法分析(一)
    【旧文章搬运】PspCidTable攻与防
    【旧文章搬运】PspCidTable概述
  • 原文地址:https://www.cnblogs.com/pk-run/p/5074774.html
Copyright © 2011-2022 走看看