Artifact Deployer Auth Issue
After upgrading from TeamCity 9.1.6 to 2017.1.1 I am seeing issues using scp build step to copy files using the SCP Upload build step.
None of the settings were changed after the upgrade and the credentials have been verified.
I am using the "Simple Password" auth
The error in the build log is:
[08:57:43]Step 3/4: Deploying version (SSH Upload)
[08:57:43][Step 3/4] com.jcraft.jsch.JSchException: Auth fail
[08:57:43][Step 3/4] Step Deploying version (SSH Upload) failed
Prior to the upgrade we were using version "snapshot-20143006104602" of the plugin
Please sign in to leave a comment.
Hi William,
The best option at this case would be to check the ssh server logs. They should provide more information on what failed.
Where can I locate those? I don't see any ssh log on TeamCity.
I see this in the agent logs:
WARN - gent.ssh.scp.ScpProcessAdapter - Auth fail: com.jcraft.jsch.JSchException: Auth fail (enable debug to see stacktrace)
How do I enable debug?
Hi William,
The ssh server logs are on the SSH server, on the target where you are trying to upload. For enabling debug on the build, please follow this steps (use the ones for generic debugging): https://confluence.jetbrains.com/display/TCD10/Viewing+Build+Agent+Logs#ViewingBuildAgentLogs-GenericDebugLogging
In the SSH logs, I only see
error: Received disconnect from 10.110.60.129: 3: com.jcraft.jsch.JSchException: Auth fail [preauth]
10.110.60.129 is the TeamCity agent
What does this mean?
Hi William,
I'm not sure, could you, as the error message before mentioned, activate debug (see link above) and try again to see what the stacktrace says.
[2017-06-20 10:34:53,268] INFO - erStages.start.CallRunnerStage - ----------------------------------------- [ Step Step 3/4: 'Deploying version (SSH Upload)' (ssh-deploy-runner), Build Web :: Windows #0.10.8 {id=2880562, buildTypeId='Pts_Arkham_Main_Web_Windows'} ] -----------------------------------------
[2017-06-20 10:34:53,320] WARN - gent.ssh.scp.ScpProcessAdapter - Auth fail: com.jcraft.jsch.JSchException: Auth fail
[2017-06-20 10:34:53,322] DEBUG - gent.ssh.scp.ScpProcessAdapter - Auth fail
com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(Session.java:519)
at com.jcraft.jsch.Session.connect(Session.java:183)
at jetbrains.buildServer.deployer.agent.ssh.SSHSessionProvider.getSession(SSHSessionProvider.java:199)
at jetbrains.buildServer.deployer.agent.ssh.scp.ScpProcessAdapter.runProcess(ScpProcessAdapter.java:51)
at jetbrains.buildServer.deployer.agent.SyncBuildProcessAdapter.start(SyncBuildProcessAdapter.java:54)
at jetbrains.buildServer.agent.impl.buildStages.runnerStages.start.CallRunnerStage.doBuildStage(CallRunnerStage.java:74)
at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor$1.callStage(RunnerStagesExecutor.java:25)
at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor$1.callStage(RunnerStagesExecutor.java:18)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:78)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37)
at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor.doStages(RunnerStagesExecutor.java:18)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunnerContextExecutor.callRunnerStages(RunnerContextExecutor.java:43)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.StepExecutor.processNextStep(StepExecutor.java:25)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.executeRunnerStep(ForEachBuildRunnerStage.java:138)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.runStep(ForEachBuildRunnerStage.java:123)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.executeBuildRunners(ForEachBuildRunnerStage.java:83)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.doBuildStage(ForEachBuildRunnerStage.java:44)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:31)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:24)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:78)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24)
at jetbrains.buildServer.agent.impl.BuildRunActionImpl.doStages(BuildRunActionImpl.java:75)
at jetbrains.buildServer.agent.impl.BuildRunActionImpl.runBuild(BuildRunActionImpl.java:55)
at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:295)
at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:53)
at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:259)
at java.lang.Thread.run(Unknown Source)
William,
Please, try re-entering the credentials (enter incorret ones,save, enter correct ones and save ones again).
See if it helps.
Then double check you can login using entered credentials _from the build agent machine_
I have already tried to do this, and it did not do anything.
The credentials have been checked as noted before.
As a workaroud, can you try using ssh keys? I understand, it requires uploading a private key to TeamCity and public key to ssh server, but nevertheless, please try.
Using an SSH key works, still username and password does not.
Glad to hear you have the step working. We will look into improving the SSH Exec logging to investingate your issue further
I've updated TeamCity to 2017.1.2 (plugin version is now 46812)
I am still having the same problem.
Any updates?
I wanted to see if there is any update on this topic
Hi Bagdon,
When configured to use username/password, Deployer plugin attempts to use "password" type of SSH auth. Please, check that this kind of auth is allowed in SSH server settings. Having "keyboard-interactive" auth type enabled on SSH server is not enough.