Search code examples
gittortoisegit

Tortoise Git: Getting can not spawn error while performing git push


Tortoise Git does not allow me to push my code.

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

It is throwing below error

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

Tortoise git does not allow to clone the code as well so I used git bash instead and it worked.

I am not sure, what needs to be corrected for Tortoise GIT as PUSH and Clone commands works well for GIT Bash. Clueless :(

Please help


Solution

  • As mentioned here, check your:

    • GIT_SSH environment variable (within Windows): if it has quotes around it, remove those quotes
    • Settings->Network (within TortoiseGit): update your SSH Client path to the path of TortoiseGitPlink.exe, without quotes

    As the OP Gendaful confirms in the comments:

    My problem was on the same lines.

    It did not have TortoiseGitPlink.exe path in double quotes, but:

    • the tortoise git was installed as TortoiseGit_2.5.2 and
    • the path had the reference as "TortoiseGit"

    which was making the TortoiseGitPlink.exe unreachable.
    Corrected the path and it started working.