Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git Error; RPC failed; result=22, HTTP code = 401

I am trying to get some subversion code - and history into TFS.

Going via GIT seemed like a quick win and following the steps in the below url:

http://www.incyclesoftware.com/2013/08/how-easy-its-to-migrate-svn-to-tfs-2013-git-repo/

I made progress, and imported my test svn repository into a 'local' git instance. However when I try and push it to TFS I get an error.

TFS itself is instructing me on how to 'push an existing repository'

git remote add origin
http://servername:8080/tfs/DefaultCollection/_git/TestDVCS3 git push -u origin --all

The local GIT repository is ~3GB

This is the message I get

Username for 'http://servername:8080': myusername
Password for 'http://myusername@servername:8080':
Counting objects: 145003, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (40421/40421), done.
Writing objects: 100% (145003/145003), 826.47 MiB | 919.00 KiB/s, done.
Total 145003 (delta 98198), reused 135297 (delta 89983)
error: RPC failed; result=22, HTTP code = 401
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date

Things to note here:

  1. the size of 826.47 MiB seems a bit low
  2. the error code(401) implies there was an access issue.
    However at this point I have authenticated and continued so that seems a bit odd.

Does anyone have any experience here?

like image 823
Jon H Avatar asked Apr 04 '14 15:04

Jon H


1 Answers

After a bit searching I found this Git - error: RPC failed; result=22, HTTP code = 401 fatal: The remote end hung up unexpectedly, however you already tried(according your comment). According to atlassian document(https://confluence.atlassian.com/display/STASHKB/Git+Push+Fails+-+fatal%3A+The+remote+end+hung+up+unexpectedly) the reason error you got is size of postBuffer and you need to increase it.

Increase the Git buffer size to the largest individual file size of your repo:

git config --global http.postBuffer 157286400
like image 188
FatmaT Avatar answered Oct 04 '22 20:10

FatmaT