Q:

git.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

I am working on project using git as a VCS. Development env is on winddows and project contains some long paths so I am forced to use cygwin with git.
I have installed cygwin with git, created ssh key, uploaded key to server and that all works fine from console.
But when I try to fetch, push, pull from IntelliJ I am receiving following error: 
D:/cygwin/usr/libexec/git-core/git.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
fatal: unpack-objects failed

I have installed gettext and Devel\gettext , libsasl2 and ca-certificates packages for cygwin according to some recomendation I have found but this didn't solve the problem.
Here is my IntelliJ git configuration
What I have to do to be able use git from cygwin within IntelliJ?

A:

I had the exact same problem. Also tried the gettext & sasl hints; didn't work.
The solution was very simple in the end: add your cygwin bin directory to the PATH. 
(This surfaced when setting bash as Terminal in IntelliJ - it wouldn't even start grep.)

A:

Add both C:\cygwin\bin AND c:\cygwin to the PATH.
Then restart IntelliJ Idea.

