0
votes

I want to deploy my created war automatically to /tomcat/webapps from jenkins scp plugin.

  • In jenkins ->Manage Jenkins ->configure system

Hostname-deploy port-22 repository- "ipaddress:8080"/usr/bin/scp

Username-jenkins

Error here "Cant connect to server"

password-jenkins

  • In jenkins->new job ->configure

scp site - deploy

file to upload

source - http://"ip:8080"/var/lib/jenkins/workspace/WebWarDemo/source/**

destination - http://"ip:8080"/usr/share/tomcat6/webapps/

above is my configuration for scp plugin but i am getting error in first configuration as shown. but when i tried to run the another error is "jenkins scp com.jcraft.jsch.jschexception auth cancel" i tried so many times changing user name no effect plz suggest anything

I am entering username and password of jenkins server user.

1

1 Answers

1
votes

Make sure of the following things:

  1. The user with which you are trying to connect to Repository server has "WRITE" access.
  2. SSH connection has been established between the twos servers with public keys of the respective users
  3. Login to jenkins as jenkins user and run the following

     ssh repouser@repository server
    

    What do you get?

Let me know if you have ensured these. Will take it ahead from there