I am trying to clone a project from github (https://github.com/bhilburn/powerlevel9k to be specific, but all github repos fail in the same way), using Visual Studio 2013's native git integration.
I tried going to File -> Open From Source Control. That opens up the "Team Explorer" window on the left. I then click on the drop down panel for "Clone" under the "Local Git Repositories" heading. After that I enter the URL for powerlevel9k. VS2013 then gives me a very unhelpful message: "An error occurred. Detailed message: An error occurred while sending the request."
I am stuck. I do not know what to do here. Nothing I try seems to work. All github repos I have tried give me the same exact error message.
If anyone can help me sort this out I would be eternally greatful.gitgithubvisual-studio-2013cloning
This isn't a solution, rather just what we tried (none of which worked).
This way, anyone else who might stumble on this question later might be able to offer other ideas/solutions.
As this other SO question/answer points out (which I didn't see until yesterday afternoon), it might be best to use another tool for Git and not rely on VS 2013's Git support.
From what I could find on the Net, the rather unhelpful error message is most likely indicative of certificate issues when trying to connect to / work with an https repository (as written about in this blog article):
Special considerations for HTTPS endpoints
If an HTTPS URI is used for a remote, the Windows certificate store is used to validate the server’s SSL certificate.
If the server to which you are pushing/pulling has a self-signed certificate, then as of this writing, we give an unfortunate and vague error message to the user. “An error occurred while sending the request” [emphasis added by me] is what is commonly seen. You should use the Windows certificate manager (certmgr.msc) to add the self-signed certificate (or the authority at the top of the certificate’s chain) to the Windows certificate store as a trusted certificate, and then try your network operation again.
From the SO question (linked at beginning of answer) points out (which coincidentally links to the same article as above), it's not clear at all what certificate(s) would need to be added.
After more searching, I found another article that seemed might be related (dealing with SSL and certificate issues) (although it was regarding VS 2015, not 2013, and the error message wasn't the same):
Google pointed me at the .gitconfig file that lives at the root of your user directory. When I looked at that it contained not much at all – just a reference to the recently cloned repository I had tested with above. So I added the setting necessary to tell Git to find it’s trusted certificates in the same place that the command line tools had reported:
[http] sslcainfo = C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
And remarkably that fixed Visual Studio…
This is what I had Avi try:
Avi also tried importing the 'ca-bundle.crt' certificate into Windows Certificate Manager.
And last, but not least, Avi tried adding that same [http] block to the 'config' file under the specific repo's '.git' folder.