首页 > 解决方案 > Tortoise Git:执行 git push 时无法生成错误

问题描述

Tortoise Git 不允许我推送我的代码。

git.exe push --progress "origin" <<branch_name>>

它抛出错误

error: cannot spawn C:\Program Files (x86)\TortoiseGit\bin\TortoiseGitPlink.exe: No such file or directory
fatal: unable to fork

Tortoise git 也不允许克隆代码,所以我改用 git bash 并且它有效。

我不确定,对于 Tortoise GIT 需要纠正什么,因为 PUSH 和 Clone 命令适用于 GIT Bash。无知:(

请帮忙

标签: gittortoisegit

解决方案


如此处所述,请检查您的:

  • GIT_SSH 环境变量(在 Windows 中):如果它有引号,请删除这些引号
  • Settings->Network(在 TortoiseGit 中):将您的 SSH 客户端路径更新为 的路径TortoiseGitPlink.exe,不带引号

正如OP Gendaful在评论中确认的那样:

我的问题在同一条线上。

它没有双引号中的 TortoiseGitPlink.exe 路径,但是:

  • 乌龟 git 安装为 TortoiseGit_2.5.2 和
  • 该路径的引用为“TortoiseGit”

这使得TortoiseGitPlink.exe无法访问。
更正了路径并开始工作。


推荐阅读