【发布时间】:2011-06-13 05:11:12
【问题描述】:
我已经打了一天多,这让我发疯了!
- 我在 Win7 PC 上安装了 Git, 并选择了 PuttyGen 选项 安装。
- 我已经生成了 ssh 密钥 使用 PuttyGen;我已经添加了 ssh 我的 Git 帐户的密钥,并链接了 选美中的私钥。
- 我已经设置 GIT_SSH 指向我的腻子 plink.exe。
- 我使用 Putty 进行连接 到 codaset & git 让他们接受 作为已知的主机。
我可以从控制台克隆,但是 hudson 失败了:
Fetching upstream changes from git@codaset.com:xxx/xxx.git
[workspace] $ "C:\Program Files\Git\bin\git.exe" fetch -t git@codaset.com:xxx/xxx.git +refs/heads/*:refs/remotes/origin/*
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
ERROR: Could not fetch from any repository
FATAL: Could not fetch from any repository
hudson.plugins.git.GitException: Could not fetch from any repository
...
如果我在控制台中运行确切的 git 命令,它就可以正常工作:
"C:\Program Files\Git\bin\git.exe" fetch -t git@codaset.com:xxx/xxx.git +refs/heads/*:refs/remotes/origin/*
我已经尝试运行 plink 直接连接到 GitHub:
plink -agent -v git@github.com
Looking up host "github.com"
...
Pageant is running. Requesting keys.
Pageant has 1 SSH-2 keys
Using username "git".
...
Authenticating with public key "rsa-key-20110121" from agent
...
Hi xxx! You've successfully authenticated, but GitHub does not provide
shell access.
然后我尝试连接到 codaset:
plink -agent -v git@codaset.co
m
Looking up host "codaset.com"
Pageant is running. Requesting keys.
Pageant has 1 SSH-2 keys
Using username "git".
...
Authenticating with public key "rsa-key-20110121" from agent
...
Opened channel for session
Server refused to allocate pty
Started a shell/command
Error: Command is required.
...
Server sent command exit status 255
Disconnected: All channels closed
因此,来自 codaset 的响应与来自 git 的响应略有不同。但是,我认为这可能是一个红鲱鱼,因为如果我尝试从 hudson 连接到标准 git 项目,我会遇到同样的错误。
我还设置了 Go Server(CruiseControl 原样),并在尝试从此处连接到 git 时遇到类似错误:
ERROR: FATAL ERROR: Disconnected: No supported authentication methods available
ERROR: fatal: The remote end hung up unexpectedly
这让我觉得问题一定出在身份验证上,而不是 hudson 详细信息...?
一如既往,非常感谢任何帮助!
【问题讨论】:
标签: git authentication ssh hudson