【问题标题】:Git with putty on windowsGit与Windows上的腻子
【发布时间】: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
  • 这个问题解决了吗?

标签: windows git ssh putty


【解决方案1】:

这是通过删除“ssh://”解决的,这显然是在 Git 扩展中隐含的。

【讨论】:

    猜你喜欢
    • 2013-05-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-25
    • 2012-10-26
    • 1970-01-01
    • 2012-05-14
    • 2014-03-04
    相关资源
    最近更新 更多