Hudson will not receive from Git

I beat it for more than a day, it drives me crazy!

  • I have Git installed on a Win7 computer and selected the PuttyGen option to install.
  • I created ssh keys using PuttyGen; I added the ssh key to my Git account and linked the private key in Pageant.
  • I created GIT_SSH to point to my putty plink.exe.
  • I used Putty to connect to codaset and Git to accept them as well-known hosts.

I can clone from the console, but hudson fails:

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
    ...

If I run the exact Git command in the console, it works fine:

"C:\Program Files\Git\bin\git.exe" fetch -t git@codaset.com:xxx/xxx.git +refs/heads/*:refs/remotes/origin/*

I tried running plink to connect directly to 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.

Then I tried to connect to 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. , , , Git hudson.

Go (CruiseControl as was) Git :

ERROR: FATAL ERROR: Disconnected: No supported authentication methods available
ERROR: fatal: The remote end hung up unexpectedly

, , hudson...?

, !

+5
4

. git , , , , Hudson. su , . .

+2

hudson , ? , , , ssh github.

, ( ) - , hudson.

0

, hudson , ... , !

0

SSH Fatal Error " /", Putty Plink.exe

, , . , , , , . , Enter , "exit", "Enter", SSH-.

, , :

. PowerShell.

$Commands= @" 

    show status 
    exit 
    exit
"@

Note that each line in this parameter represents an "Enter" key. Then I passed the Commands parameter to the plink.exe file, as shown below:

$output = $Commands |.\Putty\plink.exe -auto_store_key_in_cache -l $UserName -pw $Password $CalledPartyIP -v 2>&1

It will pass a list of commands to output and output the detailed result to the $ output variable.

Hope this helps!

0
source

All Articles