gpt4 book ai didi

git - 为什么我不能再运行 git 命令(错误 : no matching mac found: client hmac-md5. ..)

转载 作者:行者123 更新时间:2023-12-04 16:08:38 25 4
gpt4 key购买 nike

我没有在我的机器上改变任何东西。每次更改我的代码时,我都会运行此命令。

git push thing-staging beta-staging:master

我得到的响应是:

找不到匹配的 mac:客户端 hmac-md5....致命:远程端意外挂断

有人对为什么这不再有效或如何找出到底发生了什么有任何建议吗?

最佳答案

您的本地 ssh 似乎与您要推送到的 git 存储库上使用的 ssh 服务器不兼容。听起来服务器正在运行旧版本的 ssh 服务器,而您的新客户端已放弃对 hmac-md5 算法的默认支持(因为该算法现在被认为是不安全的)。

您可以使用 ~/.ssh/config 文件中的 MACs 配置选项修改 ssh 使用的 MAC 算法。根据ssh_config man page ,启用的 MAC 的默认列表是:

umac-64-etm@openssh.com,umac-128-etm@openssh.com, 
hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
hmac-sha1-etm@openssh.com,
umac-64@openssh.com,umac-128@openssh.com,
hmac-sha2-256,hmac-sha2-512,hmac-sha1

以上内容可能与版本有关。您需要将 hmac-md5 添加到此列表中,因此您将添加到您的 ~/.ssh/config 中,例如:

MACs umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5

这会将配置应用于所有您的 ssh 连接;您还可以使用 Match 指令将其仅应用于托管远程 git 存储库的服务器。有关详细信息,请参阅 ssh_config 手册页。

关于git - 为什么我不能再运行 git 命令(错误 : no matching mac found: client hmac-md5. ..),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46938362/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com