I am trying to migrate a repo from Azure DevOps to GitHub but do not have the option to use the "Import a repo" option for some reason. When I manually configure the remote url and push, it hangs for a while then fails with the following errors after the Total
line:
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
There is a single pack file from the Azure DevOps clone was huge (>100 MB). This might be what is causing the push not to work. What can I do to resolve this problem?
I am not familiar with pack files and if they can be split or removed safely or anything like that. I have never encountered and issue like this. If a file was over 100MB I would use git LFS but this pack file is part of the .git
folder itself.
Thanks for the help!
CodePudding user response:
The HTTP protocol (curl command) was to blame for the error. We should also increase the buffer size.
git config --global http.postBuffer 524288000
Then clone by command:
git clone [email protected]:my_group/my_repository.git
NOTE: The most common issue is that the connection closes and the whole clone is cancelled.
Found few more solutions in below mention thread similar to this.
CodePudding user response:
To migrate a repo from Azure DevOps to GitHub you can use the GitHub's import option which does not advertise that it can be used with git repos but it works for them. (Yes, the original repo's history is imported.)
- In GigHub Create a new repository
- In step 2 choose Import:
- Paste the clone url of the git repo in DevOps:
- GitHub will ask to authenticate with DevOps. Use a personal access token for that:
I learned this from YT's CoderDave here and I confirmed it works.