Git-1.7.7-preview20111014.exe: Git Bash: git: ... cygcrypto-0.9.8.dll is missing ...

802 views
Skip to first unread message

Ken....@bench.com

unread,
Oct 17, 2011, 7:49:39 PM10/17/11
to msy...@googlegroups.com
Whenever I run git, it displays the following message in a requester pop
up window:

The program can't start because cygcrypto-0.9.8.dll is missing from your
computer. Try reinstalling the program to fix this problem.

I tried reinstalling Git-1.7.7-preview20111014.exe several times and
also tried uninstalling it followed by a normal installation. git still
fails to start.

I already had cygwin running, but I don't believe that I have its git
command installed.

$ which git
/c/home/<userid>/bin/git

My client machine runs MS windows 7 64 bit.

On the first installation, I selected "Run Git and included Unix tools
from the Windows Command Prompt". I rarely use the Windows Command
Prompt, so I didn't think it would matter. I tried the other two
options, "Run Git from the Windows Command Prompt" and "Use Git Bash
only". None of these options allowed git to start properly.

I selected Checkout as-is, commit as-is.

Thanks.

Sebastian Schuberth

unread,
Oct 18, 2011, 8:38:04 AM10/18/11
to Ken....@bench.com, msy...@googlegroups.com
On 18.10.2011 01:49, Ken....@bench.com wrote:

> The program can't start because cygcrypto-0.9.8.dll is missing from your
> computer. Try reinstalling the program to fix this problem.

This is a DLL from Cygwin, not (msys)Git, as it starts with "cyg...".

> On the first installation, I selected "Run Git and included Unix tools
> from the Windows Command Prompt". I rarely use the Windows Command

Git is probably trying to use your Cygwin's SSH (probably because you
have Cygwin in your PATH), which in turn requires cygcrypto-0.9.8.dll.
Check your GIT_SSH environment variable and unset it if set, or
explicitly set it to the SSH executable that comes with Git.

--
Sebastian Schuberth

Ken....@bench.com

unread,
Oct 18, 2011, 2:10:56 PM10/18/11
to msysGit
Issue solved temporarily, but not via GIT_SSH. See "Temporary
Solution:" below.

Missing cygcrypto-0.9.8.dll and now missing cygcurl-3.dll:

On Oct 18, 7:38 am, Sebastian Schuberth wrote:

> Git is probably trying to use your Cygwin's SSH (probably because you
> have Cygwin in your PATH), which in turn requires cygcrypto-0.9.8.dll.
> Check your GIT_SSH environment variable and unset it if set, or
> explicitly set it to the SSH executable that comes with Git.

There's no GIT_SSH environment variable set (set | grep GIT_SSH has
NULL output)

So I tried doing what you suggested in the Git Bash shell:

$ export GIT_SSH=/c/Program\ Files\ \(x86\)/Git/bin

Now when I run:

$ git

A pop up window named "git.exe - System Error" displays:

The program can't start because cygcurl-3.dll is missing from your
computer. Try reinstalling the program to fix this problem.

This message should be changed from "is missing from your computer"
to "can't be found". That allows the possibility that the file is
on the computer, but can't be located by the program with the info
it has been provided.

There are three environment types on my system now, Windows, Cygwin
and Git Bash. I believe that Git Bash is the correct environment to
change to avoid side effects in the other two. Of course git will
only run within Git Bash, but that will suffice for now at least.

Old ssh:

Observation: The openssh included by msysgit is rather old:

$ ssh -V
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
$

The cygwin version of OpenSSH/OpenSSL is significantly newer:

cygwin$ ssh -V
OpenSSH_5.9p1, OpenSSL 0.9.8r 8 Feb 2011
cygwin$

It's better to use a newer version of SSH, so I changed GIT_SSH again:

$ export GIT_SSH=/c/cygwin/bin/ssh.exe
$ $GIT_SSH <hostname>

Or switch all ssh access to the newer version:

$ alias ssh=/c/cygwin/bin/ssh.exe

It works very well and faster too.

Git is still broken on my system:

There seems to be a conflict between msysgit and cygwin. I have a
pristine
install of cygwin, except I copied a dll to fix a bug a few months
ago.
I have made no configuration changes in either cygwin or msysgit,
except
changing GIT_SSH as mentioned above. I (try to) run git in the
provided
Git Bash shell, so I am a bit surprised it doesn't work as installed.

msysgit should install and work fine when selecting the Git Bash only
installation option without configuring anything, since it can set its
PATH as required without affecting other shells such as cygwin shells.

Temporary Solution:

So, I tried prepending the msysgit bin path to the beginning of the
PATH
environment variable that Git Bash sets that at least partially comes
from ~/.bashrc as defined in my cygwin install:

$ export PATH=/c/Program\ Files\ \(x86\)/Git/bin:$PATH

So the above change to Git Bash allowed git to run and show its usage
output.
I was pleasantly surprised that the solution was so simple. I thought
it
would involve some arcane MS Windows knowledge, but the developers of
msysgit and cygwin have kindly protected us from needing to know such
things!

How can I make this change permanent for just Git Bash? I don't want
to
blindly (unconditionally) add it to my ~/.bashrc or it may adversely
affect
cygwin programs. Does Git Bash set something unique that I can check
for
in ~/.bashrc to conditionally add the above PATH modification for
(g)it? Or
is there some other way to set this PATH for just Git Bash and no
other shell?

Thank you very much Sebastian for your clue to solving this issue!
You saved me
much time and frustration. As mentioned in the above paragraph, how
can I make
my solution permanent?

Ken

Erik Faye-Lund

unread,
Oct 18, 2011, 2:37:16 PM10/18/11
to Ken....@bench.com, msysGit
On Tue, Oct 18, 2011 at 8:10 PM, Ken....@bench.com
<Ken....@bench.com> wrote:
> Now when I run:
>
> $ git
>
> A pop up window named "git.exe - System Error" displays:
>
> The program can't start because cygcurl-3.dll is missing from your
> computer. Try reinstalling the program to fix this problem.

This is still a path-issue. It seems you have a Cygwin tool that links
to cURL in the path as well, preventing Git from finding the right
tool.

>
> This message should be changed from "is missing from your computer"
> to "can't be found".

Not possible. This is an error message that Windows generate, not one
that we control.

> There are three environment types on my system now, Windows, Cygwin
> and Git Bash.  I believe that Git Bash is the correct environment to
> change to avoid side effects in the other two.  Of course git will
> only run within Git Bash, but that will suffice for now at least.
>
> Old ssh:
>
> Observation: The openssh included by msysgit is rather old:

Patches welcome.

> There seems to be a conflict between msysgit and cygwin.  I have a
> pristine
> install of cygwin, except I copied a dll to fix a bug a few months
> ago.

Yes; mixing MSys (which Git Bash really is) and Cygwin in PATH is a
bad idea, and is bound to break horribly. This is a logical problem,
not really a technical one: MSys and Cygwin doesn't work the same way,
so both of these needs to do some "magic" (like translating paths into
POSIX-style rather than Windows style), but in different ways. Mixing
tools between these packages is not really going to work very well, so
they should be completely separate systems, not knowing about each
other (not even implicitly through PATH).

Ken....@bench.com

unread,
Oct 18, 2011, 7:47:55 PM10/18/11
to msysGit
On Oct 18, 1:37 pm, Erik Faye-Lund wrote:

> Ken wrote:

> > A pop up window named "git.exe - System Error" displays:
>
> > The program can't start because cygcurl-3.dll is missing from your
> > computer. Try reinstalling the program to fix this problem.
>
> This is still a path-issue. It seems you have a Cygwin tool that links
> to cURL in the path as well, preventing Git from finding the right
> tool.

This is a result of Sebastian Schuberth's suggestion to set the
GIT_SSH
environment variable. My point is setting GIT_SSH correctly (after
adding the originally omitted "/ssh.exe") as follows did not work:

$ export GIT_SSH=/c/Program\ Files\ \(x86\)/Git/bin/ssh.exe

You don't have to tell me this is still a path issue, because I
provided the fix to it in my previous post ... repeated below ...

> > This message should be changed from "is missing from your computer"
> > to "can't be found".
>
> Not possible. This is an error message that Windows generate, not one
> that we control.

Other shells running on MS Windows like Cygwin generate error messages
to stderr which appears as simple text in the console window. They
don't generate "Windows" style error notification windows. It is
irritating to be using a very nice text shell and then be forced to
click on error notification windows whose idiotic content can't even
be changed. Presumably this is a compromise for better performance?
Did you notice that I just said I like Bash Git shell? Any
negative impressions is Microsoft's fault, either directly or
indirectly.

> > Old ssh:
>
> > Observation: The openssh included by msysgit is rather old:
>
> Patches welcome.

As I noted before, users with a current Cygwin installation can use

$ alias ssh=/c/cygwin/bin/ssh.exe

aliases to the other cygwin OpenSSH executables can be made similarly.

Copying the Cygwin OpenSSH executables plus dependent libraries to
the msysgit bin is another option, but aliases seem cleaner by not
actually mixing Cygwin executables into the msysgit install dirs.

msysgit's Bash Git shell will work fine with any of the above
solutions.

I got a new github.com account and they suggested using msysgit as
a client program. I was just following their introduction to using
git and now I'm being asked to contribute patches to a git tool.
If you don't mind, I'll decline that "promotion" and hope you find
what I can provide of some use.

> Yes; mixing MSys (which Git Bash really is) and Cygwin in PATH is a
> bad idea, and is bound to break horribly. This is a logical problem,
> not really a technical one: MSys and Cygwin doesn't work the same way,
> so both of these needs to do some "magic" (like translating paths into
> POSIX-style rather than Windows style), but in different ways. Mixing
> tools between these packages is not really going to work very well, so
> they should be completely separate systems, not knowing about each
> other (not even implicitly through PATH).

Fix: Set the following path in Bash Git:

$ export PATH=/c/Program\ Files\ \(x86\)/Git/bin:$PATH

In my opinion, msysgit should do the above when the Bash Git only
installation option is selected. That should allow correct
operation even with Cygwin also installed right after installation.

Cygwin tip: To make Cygwin paths (/cygdrive...) compatible with
msysgit and other UNIX interfaces over MS Windows, use:

cygwin$ mount --change-cygdrive-prefix /

For any drives you want listed in /, do "mkdir <drive-letter>"
before using the mount command. For example "mkdir c".

Ken

Erik Faye-Lund

unread,
Oct 19, 2011, 3:21:04 AM10/19/11
to Ken....@bench.com, msysGit
On Wed, Oct 19, 2011 at 1:47 AM, Ken....@bench.com
<Ken....@bench.com> wrote:
> On Oct 18, 1:37 pm, Erik Faye-Lund wrote:
>
>> Ken wrote:
>
>> > A pop up window named "git.exe - System Error" displays:
>>
>> > The program can't start because cygcurl-3.dll is missing from your
>> > computer. Try reinstalling the program to fix this problem.
>>
>> This is still a path-issue. It seems you have a Cygwin tool that links
>> to cURL in the path as well, preventing Git from finding the right
>> tool.
>
> This is a result of Sebastian Schuberth's suggestion to set the
> GIT_SSH
> environment variable.  My point is setting GIT_SSH correctly (after
> adding the originally omitted "/ssh.exe") as follows did not work:
>
> $ export GIT_SSH=/c/Program\ Files\ \(x86\)/Git/bin/ssh.exe
>
> You don't have to tell me this is still a path issue, because I
> provided the fix to it in my previous post ... repeated below ...
>

My point was that this was probably because Sebastian Schuberth's
suggestion _worked_. But then _another_ patch crash happened.

>> > This message should be changed from "is missing from your computer"
>> > to "can't be found".
>>
>> Not possible. This is an error message that Windows generate, not one
>> that we control.
>
> Other shells running on MS Windows like Cygwin generate error messages
> to stderr which appears as simple text in the console window.

We generate our errors on the console as well.

> They
> don't generate "Windows" style error notification windows.  It is
> irritating to be using a very nice text shell and then be forced to
> click on error notification windows whose idiotic content can't even
> be changed.

As I said, not possible. This is Windows' EXE-loader's error, and is
issued before the process hits it's entrypoint.

> Presumably this is a compromise for better performance?

No, this has nothing to do with performance. It's a built-in Windows error.

>> > Old ssh:
>>
>> > Observation: The openssh included by msysgit is rather old:
>>
>> Patches welcome.
>
> As I noted before, users with a current Cygwin installation can use
>

A user with Cygwin in it's path is doomed, for the reasons I explained
in my previous e-mail. I meant a patch to provide a script that
upgrades our OpenSSH.

> Copying the Cygwin OpenSSH executables plus dependent libraries to
> the msysgit bin is another option

Not att all; it will not work.

> I got a new github.com account and they suggested using msysgit as
> a client program.  I was just following their introduction to using
> git and now I'm being asked to contribute patches to a git tool.
> If you don't mind, I'll decline that "promotion" and hope you find
> what I can provide of some use.
>

Git is free software, and that usually means "scratch your own itch".
Let's put it this way: you got a hell of a lot for free, but you don't
get to make demands without being willing to put in some work for it.

Of course, you don't HAVE to do anything. But then I suspect your
"helpful suggestions" will go by without having changed a thing.

>> Yes; mixing MSys (which Git Bash really is) and Cygwin in PATH is a
>> bad idea, and is bound to break horribly. This is a logical problem,
>> not really a technical one: MSys and Cygwin doesn't work the same way,
>> so both of these needs to do some "magic" (like translating paths into
>> POSIX-style rather than Windows style), but in different ways. Mixing
>> tools between these packages is not really going to work very well, so
>> they should be completely separate systems, not knowing about each
>> other (not even implicitly through PATH).
>
> Fix:  Set the following path in Bash Git:
>
> $ export PATH=/c/Program\ Files\ \(x86\)/Git/bin:$PATH
>
> In my opinion, msysgit should do the above when the Bash Git only
> installation option is selected.  That should allow correct
> operation even with Cygwin also installed right after installation.
>
> Cygwin tip: To make Cygwin paths (/cygdrive...) compatible with
> msysgit and other UNIX interfaces over MS Windows, use:
>
> cygwin$ mount --change-cygdrive-prefix /
>
> For any drives you want listed in /, do "mkdir <drive-letter>"
> before using the mount command.  For example "mkdir c".
>

You're just fixing the tip of the iceberg, here. Neither of these
"fixes" fix the fundamental problem of having two subsystems sharing a
namespace while depending on the same names.

Sebastian Schuberth

unread,
Oct 19, 2011, 3:22:36 AM10/19/11
to Ken....@bench.com, msysGit
On 19.10.2011 01:47, Ken....@bench.com wrote:

> Fix: Set the following path in Bash Git:
>
> $ export PATH=/c/Program\ Files\ \(x86\)/Git/bin:$PATH
>
> In my opinion, msysgit should do the above when the Bash Git only
> installation option is selected. That should allow correct
> operation even with Cygwin also installed right after installation.

I'm glad you found a fix for your setup. However, IMHO the Git for
Windows installer should not tamper with any environment variables
unless explicitly told so. As you can see, I just can break too much.

For your specific setup with not only Cygwin installed but also in PATH,
this might be the right solution. For others, this may break things
(e.g. Windows CMD users that expect the Windows version of "find"). This
is a classic case where the user just needs to know what he's doing.

Like Erik mentioned, using MSYS (which Git for Windows is based on) and
Cygwin in parallel is in general a bad idea and also not necessary most
of the time. At work, where we required Cygwin for our build environment
before, we switched completely to the MSYS environment Git for Windows
provides instead, and it works great.

--
Sebastian Schuberth

Pat Thoyts

unread,
Oct 19, 2011, 7:00:15 AM10/19/11
to Sebastian Schuberth, Ken....@bench.com, msysGit

cygwin have their own port of git. If you are using git in a cygwin
environment then that port should be used. We try and make sure we
avoid calling cygwin utilities in case a Windows user has cygwin
around. But if you are actually using a cygwin bash shell then you are
not really using Windows - you're using cygwin, so you need tools that
explicitly support that environment. Git for Windows is for a standard
windows environment. I'm not sure where the cygwin git lives as I
don't use cygwin at all - but I'm sure its easy to locate.

Ken....@bench.com

unread,
Oct 19, 2011, 11:28:16 AM10/19/11
to msysGit
On Oct 19, 2:22 am, Sebastian Schuberth wrote:
> On 19.10.2011 01:47, Ken wrote:
>
> > Fix:  Set the following path in Bash Git:
>
> > $ export PATH=/c/Program\ Files\ \(x86\)/Git/bin:$PATH
>
> > In my opinion, msysgit should do the above when the Bash Git only
> > installation option is selected.  That should allow correct
> > operation even with Cygwin also installed right after installation.
>
> I'm glad you found a fix for your setup. However, IMHO the Git for
> Windows installer should not tamper with any environment variables
> unless explicitly told so. As you can see, I just can break too much.

The name "Git Bash" strongly suggests that its primary (nearly
exclusive use) is to access a git repositories. Putting the Git
bin directory at the beginning of the path for just the Git Bash
shell seems quite reasonable to me, especially if you ask the
user if that's OK to do.

> For your specific setup with not only Cygwin installed but also in PATH,
> this might be the right solution. For others, this may break things
> (e.g. Windows CMD users that expect the Windows version of "find"). This
> is a classic case where the user just needs to know what he's doing.

I'm suggesting this fix for the "Git Bash" shell only, so it
can not possibly affect MS Windows CMD users, because it's path
would not be changed (if you followed my suggestion precisely).

> Like Erik mentioned, using MSYS (which Git for Windows is based on) and
> Cygwin in parallel is in general a bad idea and also not necessary most
> of the time. At work, where we required Cygwin for our build environment
> before, we switched completely to the MSYS environment Git for Windows
> provides instead, and it works great.

The installer can detect a Cygwin installation and offer options
to mitigate path related problems including "Abort installation
and suggest using Cygwin's git instead" and "Add msysgit's bin
to the path only for the Git Bash shell".

---

To be clear, I'm suggesting an (optional) path change to the
"Git Bash" executable only of:

$ export PATH=/c/Program\ Files\ \(x86\)/Git/bin:$PATH

The user would need to be informed that all msysgit binaries
would have priority over all other executables and libraries
that conflict with names that msysgit uses.

Ken
Reply all
Reply to author
Forward
0 new messages