Git can't find .ssh

后端 未结 5 2135
一整个雨季
一整个雨季 2021-02-08 08:46

Problem using msysgit on Windows; it can\'t find .ssh/id_rsa, even though it is present where it should be.

I verified that\'s the problem with ssh -v git@github.com; th

5条回答
  •  萌比男神i
    2021-02-08 09:00

    Found it!

    The problem is that there are two different git commands, git.exe (the actual program) and git.cmd (which sets up the necessary stuff for it to work on Windows). Depending on what options you set at install time, you can end up with a scenario where the former rather than the latter is the one that ends up in your path, so it doesn't work. Then the usual debugging suggestions regarding ssh.exe don't work unless you've run git.cmd.

    In a nutshell, just make sure you're running git.cmd instead of git.exe.

提交回复
热议问题