Visual Studio 和 libgit2 Git 提交错误在不同的解决方案中
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21194969/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Visual Studio and libgit2 Git Commit Error In Different Solution
提问by Mike Flynn
While commiting from Visual Studio got my GIT repo, I get the following error below. It's weird because I have another copy of the project that uses the same repository and that solution commits just fine, same repo and everything. Clues?
虽然从 Visual Studio 提交获得了我的 GIT 存储库,但出现以下错误。这很奇怪,因为我有另一个使用相同存储库的项目副本,并且该解决方案提交得很好,相同的存储库和所有内容。线索?
An error occurred. Detailed message: An error was raised by libgit2. Category = Net (Error).
This transport isn't implemented. Sorry
Also if I go to the folder and do it via another GIT Guid or command prompt it works fine on that same folder.
此外,如果我转到该文件夹并通过另一个 GIT Guid 或命令提示符执行此操作,则它可以在同一个文件夹上正常工作。
回答by Edward Thomson
Unfortunately, Visual Studio Tools for Git do not yet support remote repositories using the SSH protocol, only HTTP and HTTPS.
遗憾的是,Visual Studio Tools for Git 尚不支持使用 SSH 协议的远程存储库,仅支持 HTTP 和 HTTPS。
Investigate the .git/config
in each repository to ensure that you did not clone one repository with SSH. If you did, try to switch the remote to an HTTPS endpoint.
调查.git/config
每个存储库中的 以确保您没有使用 SSH 克隆一个存储库。如果您这样做了,请尝试将远程切换到 HTTPS 端点。
回答by Tarun
I was able to resolve this by doing a pull from Team Explorer in VS 2013 without having any solution open. Just do this one time.
我能够通过从 VS 2013 中的团队资源管理器中拉取来解决这个问题,而无需打开任何解决方案。只做一次。
This worked, and since then I haven't seen libgit error for any other solution as well.
这有效,从那时起我也没有看到任何其他解决方案的 libgit 错误。
This is tested for VS 2012 as well.
这也针对 VS 2012 进行了测试。
回答by mikepoole72
I was running VS2012 Pro on Windows 7 and got this error. Checked all of the above but the config files were the same. Had pending windows updates and a reboot cured it.
我在 Windows 7 上运行 VS2012 Pro 并收到此错误。检查了以上所有内容,但配置文件是相同的。有待处理的 Windows 更新和重新启动治愈它。