Git - 错误:RPC失败;结果= 22,HTTP代码= 401致命:远程端意外挂断 [英] Git - error: RPC failed; result=22, HTTP code = 401 fatal: The remote end hung up unexpectedly

查看:766
本文介绍了Git - 错误:RPC失败;结果= 22,HTTP代码= 401致命:远程端意外挂断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是Ubuntu 11.10机器。我已经安装了版本1.7.7.1的git。我使用git-cola推拉我的代码,并且能够成功提交并推送我的更改。



现在,我改变了我的机器和我的新系统与上述配置相同。 (Ubuntu 11.10机器和git版本1.7.7.1)。



在新机器上,我在 git push 上遇到问题。当我尝试推送我的代码时,出现以下错误消息:

 错误:RPC失败;结果= 22,HTTP代码= 401 
致命:远程端意外挂断
致命:远程端意外挂断

在互联网上,我发现它可能是由于以下任何一个原因:


  • 错误git用户密码(在我的情况下,我需要使用正确的密码来推送代码,因为即使现在我成功了,当我从旧系统中推送工作区代码时(使用相同的密码!)但是问题只能从我的新系统中获得。

  • 使用以下命令增加缓冲区大小: git config --system http.postBuffer 52428800


    我试过这个,但没有运气,甚至试图增加我的缓冲区大小超过52428800,但仍然是相同的错误。

    在这个问题上陷入困境。任何人都可以请给我一个解决方案。



    谢谢。

    解决方案

    您必须在远程URL中犯了一个错误,使用 git remote -v 输出并使用

      git修复输出远程设定网址来源<新网址> 

    假设远程名称是 origin


    I am using ubuntu 11.10 machine. I have installed git of version 1.7.7.1. I am using git-cola to push and pull my code and I was able to commit and push my changes successfully.

    Now, I have changed my machine and my new system is with the same above configurations. (Ubuntu 11.10 machine and git version 1.7.7.1).

    In the new machine, I have issues on git push. I got the following error message when I tried to push my code:

    error: RPC failed; result=22, HTTP code = 401
    fatal: The remote end hung up unexpectedly
    fatal: The remote end hung up unexpectedly
    

    On internet, I found it may due to any one of the following reason:

    • Wrong git user password (In my case, I fee that I am using the correct password to push the code. Because, even now I was successful, when I push workspace code from my old system (with the same password!). But the problem is only from my new system.
    • To increase buffer size using the following command:

      git config --system http.postBuffer 52428800

    I tried this, but no luck. Even tried to increase my buffer size more than 52428800, but still same error.

    Stucked on this issue. Can anyone please suggest me a solution.

    Thank you.

    解决方案

    You must have made a mistake in the remote URL, double-check the output with git remote -v and fix it with

     git remote set-url origin <new-url>
    

    assuming the remote name is origin

    这篇关于Git - 错误:RPC失败;结果= 22,HTTP代码= 401致命:远程端意外挂断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆