I installed Cygwin and TortoiseGit. And I created ssh-key by ssh-key-gen -t rsa
and registered public key to my GitHub page. When in gitbash
terminal, it worked, however, Cygwin
terminal failed.
// 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.
I noticed they use different git. Then, how do I specify git path in Cygwin? My OS is 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