我已經打了這一天了一天以上,這讓我很生氣!哈德森不會從Git中獲取
- 我有一個Win7的電腦, 上安裝了Git和選擇的puttygen選項上 安裝。
- 我使用PuttyGen生成了ssh密鑰 ;我已將ssh 密鑰添加到我的Git帳戶,並鏈接了Pageant中的 私鑰。
- 我已經設置了 GIT_SSH指向我的膩子 plink.exe。
- 我用膩子連接 codaset & git讓他們接受 作爲已知的主機。
我可以從控制檯克隆,但哈德森失敗:
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略有不同的響應。不過,我認爲這可能是一個紅鯡魚,因爲如果我嘗試從哈德森連接到標準的git項目,我會得到同樣的錯誤。
我還設置了圍棋服務器(CruiseControl的作爲是),並獲得試圖連接從這裏與git當類似的錯誤:這讓我覺得這個問題必須位於與認證
ERROR: FATAL ERROR: Disconnected: No supported authentication methods available
ERROR: fatal: The remote end hung up unexpectedly
,而比哈德遜的細節...?
一如既往,任何幫助非常感謝!
不錯,如果我從控制檯運行哈德森,它的工作原理是合理的,但如果我將哈德森作爲服務運行,則不會。乾杯! – laura 2011-01-22 12:30:32