我安装了Cygwin和TortoiseGit。我通过ssh-key-gen -t rsa
创建了ssh-key,并在我的GitHub页面注册了公钥。当在gitbash
终端,它的工作,但Cygwin
终端失败。如何在Cygwin终端中指定git路径?
// Cygwin
$ git pull
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我注意到他们使用不同的git。那么,如何在Cygwin中指定git路径?我的操作系统是Windows 10.
// Cygwin
$ where git
C:\Program Files\Git\cmd\git.exe
$ which git
/cygdrive/c/Program Files/Git/cmd/git
// gitbash (MINGW64)
$ where git
C:\Program Files\Git\mingw64\bin\git.exe
C:\Program Files\Git\cmd\git.exe
$ which git
/mingw64/bin/git
与cygwin使用它的git。它将更容易管理由cygwin ssh-key-gen – matzeri