SSH agent build feature fails on windows

Hiya,

I'm trying to make the ssh agent build feature work, but it's giving me errors with printf. I've tried now with cygwin, mingw and git for windows bundled ssh-agent.

I get the following error:

'ssh-add F:\BuildAgent\temp\buildTmp\teamcity7823492634895724858sshKey' command failed
stderr: F:\BuildAgent\temp\buildTmp\teamcity7823492634895724858askpass: line 2: printf: -%: invalid option
printf: usage: printf [-v var] format [arguments] exit code: 1

It looks like its sending an invalid command to printf? Any ideas? The temp files are removed so quickly I can't check them. I tried adding a sleep in the first build task but the files are not there while the builds halted from what I can see.

0
2 comments

Hi Steven,

 

Which version of teamcity are you using? Which versions of ssh and the ssh agent do you have installed? Having a better view on how your build configuration is set up might be better.

0
Avatar
Permanently deleted user

I figured out what this was in the end... The keyphrase for the SSH key isn't escaped properly by teamcity, which is where the -% was confusing printf as it was interpreting it as a command parameter rather than the start of the keyphrase!

I made another ssh key without certain chars in the keyphrase and it worked fine after. Apologies for not updating here sooner.

0

Please sign in to leave a comment.