Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git (SSH) in Visual Studio 2015

So with Visual Studio 2015 just being released there is a much more integrated tie-in with git.

However the feature that seems to be lacking is git over SSH. There are various plugins for 2013 that allow this functionality (i.e GitExtensions) but I can't see any with 2015.

GitHub plugin only appears to work with GitHub and not generic git repos.

I'm not looking for an opinion of which is better, only some examples or articles to see if anyone has got Git+SSH on Visual Studio 2015 working.

like image 514
John Mitchell Avatar asked Jul 21 '15 22:07

John Mitchell


People also ask

How do I SSH key to Clone Git repository in Visual Studio?

You should be giving the public key under Settings. Downloaded Sourcetree client and configured it with SSH key Options->General->SSH Client Configuration -> Need to give the private key generated by Git bash. Clone the client using Source tree and Open the same solution from Visual Studio. Push/Pull will work as usual ...

How do I open a Git project in Visual Studio 2015?

In the Team Explorer, click on the Home icon and then select Sync option. On the next screen, enter GitHub Repository URL (from step 1) and click on publish. Next, you will be prompted for GitHub credentials, enter that to sync or publish Visual Studio project to GitHub repository.

How do I use SSH with Git?

Verify which remotes are using SSH by running git remote -v in your Git client. Visit your repository on the web and select the Clone button in the upper right. Select SSH and copy the new SSH URL. In your Git client, run: git remote set-url <remote name, e.g. origin> <new SSH URL> .


1 Answers

No. Visual Studio 2015 (RTM) does not support SSH for Git remotes. This is true even with GitHub repositories using the GitHub plug-in (which - at present - uses the same connection mechanism for Git repositories as any other Git repository using Team Explorer.)

This is regrettable, but there are a handful of reasons why this is not available yet: the short answer is that in our opinion, providing SSH poorly or insecurely is worse than not providing SSH at all, and we would like to be very confident that any SSH implementation we provide is of high-quality.

That said, we are working on it, and making progress. Microsoft is going to begin including OpenSSH in Windows (and is a sponsor of that very fine project). However I cannot make any predictions as to when support might be available.

The GitHub extension is open source, so it's possible that it may be able to use a different connection mechanism and begin supporting SSH before the core Git support in Team Explorer.

like image 147
Edward Thomson Avatar answered Sep 22 '22 13:09

Edward Thomson