我已经打了一天以上了,这让我发疯了!
并选择了PuttyGen选项
安装。
使用PuttyGen;我已经添加了ssh
我的Git帐户的 key ,并关联了
Pageant中的私钥。
GIT_SSH指向我的腻子
plink.exe。
让codaset和git让他们接受
作为已知的主机。
我可以从控制台克隆,但是hudson失败了:
Fetching upstream changes from [email protected]:xxx/xxx.git
[workspace] $ "C:\Program Files\Git\bin\git.exe" fetch -t [email protected]: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 [email protected]:xxx/xxx.git +refs/heads/*:refs/remotes/origin/*
我尝试运行plink直接连接到GitHub:
plink -agent -v [email protected]
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 [email protected]
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 clone,但是我猜您不是以与运行Hudson的同一用户相同的方式进行克隆的。 su给该用户,然后重试。它可能会暴露问题。
关于git - hudson 不会从Git获取,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/4760287/