GIT and Jenkins for dummies

143 views
Skip to first unread message

David Montgomery

unread,
May 13, 2016, 8:18:51 AM5/13/16
to Jenkins Users
Hi,

I am new do Jenkins 2 and finding configuring git my no stretch of the imagination straightforward.  Where is the "I am stupid to live documentation?"

I am on a standard ubuntu 14.04 server, using github and my ssh keys work.  Docs on how to setup server with git so far are terrible with different methods of doing things.

Thanks

Mark Waite

unread,
May 13, 2016, 1:01:44 PM5/13/16
to Jenkins Users
A google search returned "Jenkins Git Integration" at https://www.youtube.com/watch?v=ISAUsBSI8G0

I created the "Jenkins in Five Minutes" video some years ago that is hosted on youtube as well.

If those aren't what you're seeking, you could try Harpreet Singh's blog posting https://www.cloudbees.com/blog/using-git-jenkins 

None of those are exactly what you want,  but they may be a good start. 

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/7b0c886f-370c-497b-bac0-151df6e214d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Montgomery

unread,
May 14, 2016, 3:56:25 AM5/14/16
to Jenkins Users
Hello Jenkins Dev team,

Wow what pain.

In this folder I have my keys and yes I an authenticate
/var/lib/jenkins/.ssh

 ssh -T g...@github.com
The authenticity of host 'github.com (xxx.xxx' can't be established.
RSA key fingerprint is 1dsdsdsdsd.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,1xxx.xxx' (RSA) to the list of known hosts.
Hi aws-deploy! You've successfully authenticated, but GitHub does not provide shell access.
jenkins@jenkins-zen-aws-development-sg-jzkm:~/.ssh$ git config --global user.email "cloud+...@example.com"
jenkins@jenkins-zen-aws-development-sg-jzkm:~/.ssh$ git config --global user.name "jenkins"


And wow....in the UI I get the below

Failed to connect to repository : Command "git -c core.askpass=true ls-remote -h g...@github.com:test/test.git HEAD" returned status code 128:
stdout:
stderr: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


OMG but is works on the command line..

git -c core.askpass=true ls-remote -h g...@github.com:tats/test.git
7ccd2997c8b6d7261b1d9c534753ce2d3a356657    refs/heads/development
7ee63a5fa284d9de7e55dc6d3733db9237d78ba0    refs/heads/master

So.....why? 

David Montgomery

unread,
May 14, 2016, 4:09:44 AM5/14/16
to Jenkins Users
Hi,

PS I can even clone as jenkins user using ssh on github.  So is this a bug with jenkins 2.3 UI?  Should I revert back to a more stable version of jenkins? 

Mark Waite

unread,
May 14, 2016, 6:13:26 AM5/14/16
to Jenkins Users

Did you use the credentials link on the administer Jenkins page to tell Jenkins your ssh private key?

After that, dogs you choose that credential for your fit repository from the job definition page?

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.
Reply all
Reply to author
Forward
0 new messages