简体   繁体   中英

Git with putty on windows

When attempting to push / pull over ssh, git is failing with the following error:

"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

The remote "testremote" is setup as "ssh://ec2-user@sweeb.net:gittest.git" and I'm using an existing keypair that I have used with PuTTY before without issue.

Pageant is running, with my key loaded.

I think the issue is the line "Using username "git-receive-pack 'ec2-user"." - I assumed git's commands were breaking on windows thanks to the space in "Program Files" so I've tried to surround everything with double quotes, but that doesn't seem to be working. Has anyone seen anything like this before?

Windows vars:

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://”来解决的,这显然隐含在Git Extensions中。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM