0

I'm trying to run a script from Teamcity Agent on other environment (mac). I am using script that contains 'ssh administrator@33.333.33.33..' when running the script as administrator on the Teamcity agent environment it works (after I used the publicKey). when running the Teamcity project I'm getting

[Step 1/1] Permission denied (publickey,keyboard-interactive).
[00:18:15][Step 1/1] Process exited with code 255
[00:18:15][Step 1/1] Step run protractor test (Command Line) failed

I've tried also adding the ssh key file to the project as seen here https://confluence.jetbrains.com/display/TCD8/SSH+Keys+Management

I'm still getting the error. I assume that maybe Teamcity Agent uses other user (than Administrator) to run the script. any ideas?

user2880391
  • 2,683
  • 7
  • 38
  • 77
  • TeamCity Agent uses the same user to run scripts as the user under which the Agent is running. Do you run the agent under the Administrator? – Alina Mishina Jul 06 '15 at 21:06
  • apparently I'm doing it as root. so I updated the public key, but now it seems like it doesn't find the script file. I'm getting [Step 1/1] bash: run.sh: No such file or directory [04:15:42][Step 1/1] Process exited with code 127 [04:15:43][Step 1/1] Step run protractor test (Command Line) failed – user2880391 Jul 06 '15 at 22:11

2 Answers2

0

This may be of use, but is potentially not a "TeamCity" issue

Permission denied (publickey,keyboard-interactive)

Community
  • 1
  • 1
Matt
  • 3,684
  • 1
  • 17
  • 19
0

Script is run using the account which is running Teamcity agent service. You need to make sure this account has enough rights to run the script.

Mohammad Nadeem
  • 9,134
  • 14
  • 56
  • 82
  • thanks. I think it is 'root' and I added public key also for that user. the problem is that now I'm getting [Step 1/1] bash: run.sh: No such file or directory [04:15:42][Step 1/1] Process exited with code 127 [04:15:43][Step 1/1] Step run protractor test (Command Line) failed – user2880391 Jul 06 '15 at 11:23