Search code examples
gitvisual-studio-2012cygwin

Use Cygwin Git+SSH with Visual Studio


I'm new to Windows development environments and have only ever used Cygwin to access Windows programs.

Is it possible for a Windows program such as VS2012 to integrate with git and a public key generated within Cygwin?

I'd rather keep as many tools within a pseudo *nix environment as possible to stay in my comfort zone.


Solution

  • Yes.

    VSTE uses its own git implementation so you don't have to configure it to use your Cygwin version or anything.

    It will still prompt you to install the Git for Windows version as it won't detect the Cygwin version, though you can easily disable that prompt without missing anything (AFAICS). Everything (including project items mapping to git status) is handled by their own implementation and works as usual.

    Related: I recommend git-credential-winstore to store your git SSH credentials in the Windows store, unlocked by your Windows user account. It does work with the Cygwin install, you only need to reference it using the Cygwin path.

    Note: Tested on VS2013, but should also apply to VS2012.