gitsvngit-svnsvn2gitsubgit

SVN to Git migration failing because of Connection reset by peer 312 error


I am trying to migrate SVN to Git using git svn clone on Windows

git svn clone -r302360:HEAD https://svnserver/svn/Development/myapi --prefix=svn/ --no-metadata --no-minimize-url --authors-file=authors.txt --stdlayout myapi```

The error I get is:


**Connection reset by peer: Error running context: Connection reset by peer at C:/Program Files/Git/mingw64/share/perl5/Git/SVN/Ra.pm line 312.**

, and when it happens, sometimes a dump file gets created with:

**0 [main] perl 30625 cygwin_exception::open_stackdumpfile: Dumping stack trace to perl.exe.stackdump**


And I see file stackdumpfile containing **STATUS_ACCESS_VIOLATION** got created after I tried re-running the git svn clone command above

[![enter image description here][1]][1]


  [1]: https://i.sstatic.net/wgNR9.png

Solution

  • Here is what worked for me

    1. When I issued git clone ... as specified in question, it would eventually error with the "Connection reset by peer" error after about 4 hrs into running during my migration process.
    2. but, it did create my project directory and initialized it as git (.git folder is located in it)
    3. so, I navigate into my project root and issued git svn fetch
    4. this would run for a while but evenually fail with the same error so I would just keep reissuing it
    5. However, eventually I did run into a revision that I could not pass beyond with git svn fetch.
    6. So, I simply looked in my TortuiseSVN > repo browser for the next higher existing revision number (in all 3 trunk, branches and tags)
    7. Once I got that next higher existing/visible revision number in TortuiseSVN, I reissued git svn fetch -r xxx:HEAD where xxx is the next higher revision number from the one that I could no go beyond.
    8. This finally reached the very last revision and completed and I was now having my project directory with .git folder in it and all project files

    For my repo, size about 2.5Gb and having about 45000 commits (so not large at all), this took about 7hrs to complete.

    Another report of about the same size, took 1/3 off time though.

    MORE INFO RE OTHER TOOLS

    1. svn2git -when it comes to svn2git tool, several of us attempted using it without success
    2. Sub Git - we tried this tool as well, just for migration, no mirroring as we don’t plan to keep SVN around, and we decided not to use it as we don’t see it creating standard Git folder ProjName with .git directory in it. Additionally, it adds some subgit jar files, no support for .gitattributes etc. We also find the documentation to be misleading but its migration time was much shorter and matter of minutes. However, because of the above, we decided to move on and use git svn for migration.