【发布时间】:2017-10-09 00:15:08
【问题描述】:
我安装了 Cygwin 和 TortoiseGit。我通过ssh-key-gen -t rsa 创建了 ssh-key 并将公钥注册到我的 GitHub 页面。在gitbash 终端中,它可以工作,但是,Cygwin 终端失败。
// 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
【问题讨论】:
-
with cygwin 使用它的 git。使用 cygwin ssh-key-gen 创建的 ssh-key 会更容易管理