I have a repository hosted on Bitbucket cloud. I have been able to clone this repository, commit to it, submit pull requests and merge without issue. I use Visual Studio 2019 Professional and the extension "Visual Studio Bitbucket Extension" (created by MistyK). This extension is outdated and is no longer supported, however, it does continue to clone repositories without issue. I also use Git Bash to verify that Visual Studio is not the problem. In the last couple of weeks, I have been receiving the following error:
"Error: RPC failed; curl 56 Failure when receiving data from the peer"
"Error encountered while cloning the remote repository: Git failed with a fatal error."
"CloneCommand.ExecuteClone"
Normally I have received this error if my Cryptographic network provider wasn't set to "Secure Channel". Everything is configured properly as I am able to successfully clone other repositories without issue. I started suspecting that maybe the repository itself had an issue with it. I created a brand new repository and started slowly committing files back into it and determined that there is one major culprit:
I have the following package installed into my solution:
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1.nupkg
It appears this package has several files that seem to cause the repository to become "corrupt" and no longer allow me to clone it once the files are merged into the repository. I have never had any issues with this package in the past and the package has never been updated in my solution.
If I delete the problematic file(s) from the repository, I am still unable to clone. If I revert any pull requests on the repository that include the problematic files, it does not resolve my issue. The only solution I have found so far is to completely recreate the repository, lose all history, and only add non-problematic files to it. This does allow me to successfully clone the repository until I add the files in question. This is concerning as these files worked in the past and I'm concerned that the files may have become corrupt over time. I can live without the files but I cannot figure out how to salvage my repository without recreating it.
I also use a remote connection to my computer which is protected by a firewall, requiring a VPN connection. Some installed software that may interfere include Sophos Endpoint Agent along with any security settings IT may have configured. Again, I haven't had these problems in the past and I have confirmed that IT hasn't changed any settings since then (including Sophos).
I am able to successfully clone the repositories (including the problematic one) outside of my remote connection. The largest repository I have is about 80MB in size.