【发布时间】:2015-06-23 14:05:27
【问题描述】:
我正确地指向了 ssh 配置中的密钥文件:
$ cat ~/.ssh/config
Host <host>
IdentityFile /cygdrive/v/poma.pem
$ ssh git@<host>
PTY allocation request failed on channel 0
Welcome to GitLab, Roman!
Connection to <host> closed.
并使用 cygwin 的 git
$ which git
/usr/bin/git
$ git --version
git version 2.1.4
$ /cygdrive/c/Program\ Files\ \(x86\)/Git/bin/git.exe --version
git version 1.9.5.msysgit.1
但是当我尝试推送时,它会显示密码提示:
$ git remote -v
origin git@<host>:poma/deploy.git (fetch)
origin git@<host>:poma/deploy.git (push)
$ git push -u origin master
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
为什么会这样?
【问题讨论】:
-
你说它显示密码提示,但我在你粘贴的文本中没有看到。
-
因为是在窗口中显示的