gpt4 book ai didi

windows - 在 Windows 上使用 putty 的 Git

转载 作者:可可西里 更新时间:2023-11-01 09:38:04 24 4
gpt4 key购买 nike

尝试通过 ssh 推送/pull 时,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 中使用过的现有 key 对。

Pageant 正在运行,我的 key 已加载。

我认为问题出在“使用用户名“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://”解决的,这显然隐含在 Git 扩展中。

关于windows - 在 Windows 上使用 putty 的 Git,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18988940/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com