I have installed two windows servers with the latest versions of cygwin and git, and am trying to clone the git repository from S1, to S2. I can successfully ssh from S2 to
Do you get this error with any other commands? With git --version
?
Try rerunning the Cygwin setup.exe
and reinstalling your cygwin1.dll
(the package is "cygwin", under "Base") and your git package (package "git" under "Devel") and rebooting.
EDIT: I found the solution.
TL;DR: Go to the GitHub AppData folder and delete the PortableGit folder, and restart GitHub
C:\Users\[username]\AppData\Local\GitHub
PortableGit
and ends in a random string of letters and numbers(Original "answer")
I tried a whole bunch of things, and I have no idea what actually worked in the end. I restarted GitHub, restarted my computer, uninstalled and reinstalled GitHub, uninstalled several other programs that I had recently installed but ended up not needing, deleted the GitHub folder in the AppData\Local directory, downloaded and installed cygwin, and possibly some other stuff I'm forgetting.
The last attempt was finding all the cygwin1.dll files in File Explorer and renaming them to cygwin1x.dll and then restarting my computer. After I did that, it worked again.
I'm hazarding a guess here, but I'm going to say that downloading and installing cygwin and then restarting my computer did the trick.
I resolved this issue by temporarily disabling Windows Defender and trying again—see https://superuser.com/a/1047031/158243 for details.
For me, the cause was, git was not installed through cygwin, though the regular download from git-scm. Once I ran the cygwin setup, added git, it worked perfectly.
In my case rebooting the computer did not work.
I finally found that it was due to a conflict between an installation of Msys (Installed when I installed the command line git utilities). If your system path contains any directories with a version of Msys, delete such path entries and try again. It looks like cygwin tries to execute the executables from the Msys installation, and the .dll detects a missmatch.
Since it is a base mismatch you could try to rebase:
git rebase <branch>