The answer is here: Cannot launch git gui using cygwin on windows, and this is essentially a duplicate question. The problem is that
gitk
and git gui
require X11 in Cygwin.
Solution
Install some of the Cygwin X11 packages:
- Run the Cygwin installer again.
- Install "xinit" under the X11 category, accepting all the dependencies.
- (Windows Start menu should now include: Cygwin-X)
- Start menu > run XWin Server
In Cygwin shell, run
export DISPLAY=:0.0
At this point I got "Authorization required, but no authorization protocol specified"
, so to fix that set
enable_xauth=0
in \bin\startxwin
(Note:)
Will need to run XWin Server every time you reboot, and set export DISPLAY=:0.0
every time you open a new Cygwin shell. (Run echo "export DISPLAY=:0.0" >>~/.profile
to have it run automatically whenever a new shell is started).
If you get couldn't connect to display ":0.0"
, mouse over the X that should be in Windows taskbar tray, the pop-up should say something like Cygwin/X Server:1.0
. Use that ":1.0"
(or similar) instead as the value for export DISPLAY
.