在Windows上使用PuTTY进行Git操作

3
尝试通过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一起使用过的现有密钥。
Pageant正在运行,并且我的密钥已加载。
我认为问题在于“Using username“ git-receive-pack'ec2-user”。”-我假设由于“Program Files”中的空格,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语法,需要像http://stackoverflow.com/a/18909539/6309中所述的配置文件。 - VonC
这个问题解决了吗? - NoobMe
1个回答

0
这个问题是通过移除 Git Extensions 显然隐含的 "ssh://" 解决的。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接