Unable to run git repository on jenkins which is deplyed under tomcat8

21 views
Skip to first unread message

archana.s...@4tigo.com

unread,
Jan 29, 2019, 10:17:15 PM1/29/19
to Jenkins Users
Hi All,

I am not able to run my git repo on Jenkins ,attach is the screen shot for your reference.

Regards,
Archana Srichandan

Capture.PNG

Mark Waite

unread,
Jan 31, 2019, 3:28:51 PM1/31/19
to Jenkins Users
Did you assign a private key credential to that job?  A username.password credential won't work with an SSH URL.  A private key credential won't work with an http or https URL.

If the private key has a passphrase, did you provide the passphrase when defining the credential in Jenkins?

Did you confirm that the private key will authenticate from the command line?

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/50dd7ccf-9ad6-45e3-a5fc-9cee050a7737%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Thanks!
Mark Waite

Archana Srichandan

unread,
Feb 1, 2019, 12:10:43 PM2/1/19
to jenkins...@googlegroups.com
Hi,
 Thanks for your reply. I gave the url as serverip:path to repository, The username is given as the user of the remote server to which to do SSH. I have created a private key for the user which I am logged in into the jenkins server. I am copying the private key directly and also the passphrase. Still I am not able to clone from the repository. Please let me know if I am doing something wrong.
Note. Jenkins is running behind tomcat. (I deploy jenkins through tomcat).
Regards,
Archana Srichandan


Robert Rajendra

unread,
Feb 1, 2019, 12:17:04 PM2/1/19
to jenkins...@googlegroups.com
Hi,

Where is the repo located is it in github or gitlab or butbucket  
1. log into the Jenkins server with ser as jenkins by running sudo su jenkins
2. cd .ssh
3. copy the public key and pste it to the repo deploy keys section 
 then you should be able to connect the jenkins with git .

Robert Rajendra

Associate Network/Server Support Engineer

IT Hands

P: +91 863.087.3094

W: www.ITHands.com



Dirk Heinrichs

unread,
Feb 1, 2019, 12:21:28 PM2/1/19
to jenkins...@googlegroups.com
Am Freitag, den 01.02.2019, 11:51 +0530 schrieb Archana Srichandan:

 Thanks for your reply. I gave the url as serverip:path to repository, The username is given as the user of the remote server to which to do SSH. I have created a private key for the user which I am logged in into the jenkins server. I am copying the private key directly and also the passphrase. Still I am not able to clone from the repository. Please let me know if I am doing something wrong.

Does your Jenkins user (the one that runs your Jenkins master/Tomcat) have the SSH host key of the Git server in its known_hosts file, or, i.o.w., did you try to do an SSH login from your Jenkins master to the Git server once to accept the host key?

HTH...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer John Marshall Doolittle, Gordon Davies, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

Robert Rajendra

unread,
Feb 1, 2019, 12:26:05 PM2/1/19
to jenkins...@googlegroups.com
Hi,

for the integration that you are doing.  you need to copy the public key of jenkins and paste it into the git  then only your git will authenticate the jenkins server .

Robert Rajendra

Associate Network/Server Support Engineer

IT Hands

P: +91 863.087.3094

W: www.ITHands.com


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

Archana Srichandan

unread,
Feb 1, 2019, 12:49:45 PM2/1/19
to jenkins...@googlegroups.com
Hi ,

I am able to set up but unable to build the sub branch other than master branch
Regards,
Archana Srichandan


Mark Waite

unread,
Feb 1, 2019, 1:29:19 PM2/1/19
to Jenkins Users
On Fri, Feb 1, 2019 at 5:10 AM Archana Srichandan <archana.s...@4tigo.com> wrote:
Hi,
 Thanks for your reply. I gave the url as serverip:path to repository, The username is given as the user of the remote server to which to do SSH. I have created a private key for the user which I am logged in into the jenkins server. I am copying the private key directly and also the passphrase. Still I am not able to clone from the repository. Please let me know if I am doing something wrong.
Note. Jenkins is running behind tomcat. (I deploy jenkins through tomcat).

Does the passphrase include characters which are special to the shell (like '#', '*', '(', or ')')?  If so, use a private key with a passphrase that does not include characters that are special to the shall.  The current git client plugin implementation has a problem with shell special characters in passphrases.

Mark Waite
 

For more options, visit https://groups.google.com/d/optout.


--
Thanks!
Mark Waite

kalyan

unread,
Feb 1, 2019, 7:51:50 PM2/1/19
to jenkins...@googlegroups.com
Quick help,

Is there a way to trigger Jenkins job on changes only to a specific subfolder in the Git repository.?
Traditionally, we were using VSTS for CICD and it has inbuilt GIT hooks to handle request but in Jenkins i couldn't find any concrete solution.

Can some body please help.


Kevin McCann

unread,
Feb 4, 2019, 12:56:18 AM2/4/19
to Jenkins Users
There's a bunch of ways you could do this, depending on your set up.

You can set the Jenkins job to only build on changes to branches that match a certain string, then have all work done in the specific subfolders match that string. Like "/ui-*"

You could set up a second job that only checks for changes in those subfolders, then only kicks off the build job you already have if it finds changes.

If you are in a pipeline, you can access the changelog and grep for what you need.

If it were me in one of my typical projects, I'd check for changed files in the pipeline, and trigger the build based on the result of the search for the subfolder.

Stack Overflow posts that'll help:

Good luck!
Reply all
Reply to author
Forward
0 new messages