windows - 如何在 Windows 上使用 SSH 详细模式运行 git 命令?

标签 windows git ssh openssh

这是 How can I run git push/pull commands with SSH verbose mode? 的 Windows 版本

有时您只需要调试 git 对 SSH 的使用。

OpenSSH 有一个用于详细输出的 -v 标志,但是如何让 git 使用它呢?

如何在 Windows 上使用 SSH 详细模式运行 git 命令?

最佳答案

如果您的 PATH 设置正确:

  • 您不需要 OpenSSH-Win64(ssh 已包含在 Git 中)
  • 你不需要指定SSH的完整路径

你需要:

set GH=C:\path\to\git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%

然后

set GIT_SSH_COMMAND=ssh -vvv

关于windows - 如何在 Windows 上使用 SSH 详细模式运行 git 命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47318691/

相关文章:

c# - 如何确定 Windows 'Download folder' 路径?

Python - 如何将 BMP 转换为 JPEG 或 PDF?这样文件大小就不是 50MB 而是更小了?

c++ - 服务崩溃加载dll

git - AWS CodeCommit - fatal error : repository 'https://git-codecommit.us-east-1..' not found

ssh - 如何为 VS Code SSH 远程配置不同的 shell?

git - 需要在防火墙 : trying ssh tunneling 后面使用 git

mysql - 如何在重新启动之间在 Windows 10 上保留 MySQL 容器

git - 如何在包含文件名大小写更改的 Git 中应用补丁?

git - 如何 pull 入非当前分支?

ssh - 在GitHub Actions上通过SSH自连接