Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can I no longer run git command (error: no matching mac found: client hmac-md5...)

Tags:

git

macos

I haven't changed anything on my machine. I run this command everytime I make changes to my code.

git push thing-staging beta-staging:master

The response I get is:

no matching mac found: client hmac-md5....fatal: The remote end hung up unexpectedly

Anyone have any suggestions on why this no longer works or how to find out what is exactly going on?

like image 203
jdog Avatar asked Oct 12 '25 22:10

jdog


1 Answers

It appears that your local ssh is incompatible with the ssh server used on the git repository to which you are pushing. It sounds like the server is running an older version of the ssh server while your newer client has dropped default support for the hmac-md5 algorithm (because that algorithm is now considered insecure).

You can modify the MAC algorithms used by ssh with the MACs configuration option in your ~/.ssh/config file. According to the ssh_config man page, the default list of enabled MACs is:

[email protected],[email protected], 
[email protected],[email protected], 
[email protected], 
[email protected],[email protected], 
hmac-sha2-256,hmac-sha2-512,hmac-sha1

The above may be version dependent. You would need to add hmac-md5 to this list, so you would add to your ~/.ssh/config something like:

MACs [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5

This would apply the configuration to all your ssh connections; you could also use a Match directive to apply this only to the server hosting your remote git repository. See the ssh_config man page for details.

like image 193
larsks Avatar answered Oct 14 '25 17:10

larsks