【发布时间】:2013-09-24 18:10:35
【问题描述】:
当尝试推/拉 ssh 时,git 失败并出现以下错误:
"C:\Program Files\Git\bin\git.exe" push -u --recurse-submodules=check -progress "testremote" project:project
Using username "git-receive-pack 'ec2-user".
FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey)
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Done
远程“testremote”设置为“ssh://ec2-user@sweeb.net:gittest.git”,我正在使用我之前与 PuTTY 一起使用过的现有密钥对。
选美正在运行,我的密钥已加载。
我认为问题在于“使用用户名“git-receive-pack 'ec2-user”。” - 由于“程序文件”中的空格,我认为 git 的命令在 Windows 上中断,所以我尝试用双引号将所有内容括起来,但这似乎不起作用。有没有人见过这样的东西?
Windows 变量:
GIT_SSH=C:\PuTTY\plink.exe
PATH=[...];"C:\Program Files\Git\cmd";"C:\Program Files\Git\libexec\git-core\";"C:\Program Files\Git\bin\"
【问题讨论】:
-
ssh://ec2-user@sweeb.net/gittest.git会更好吗? ('/' 而不是':')。 ':' 是 SCP 语法,假设配置文件为 stackoverflow.com/a/18909539/6309。 -
这个问题解决了吗?