Re: Jenkins/GitHub integration

2014-09-15 Thread Marius Gedminas
On Fri, Sep 12, 2014 at 11:34:44AM -0400, Mike Seda wrote:
 Hi All,
 I am a Systems Administrator who was recently asked to perform a
 Jenkins/GitHub integration.
 
 The requirements are...
 
 1) When a GitHub pull request is made, start a Jenkins build.
 2) Tell GitHub through the APIs that a Jenkins build is running.
 3) When the Jenkins build finishes, inform GitHub that the Jenkins
 build succeeded/failed.
 4) Update the GitHub pull request with a comment containing the URL
 of the webapp built for the branch after having deployed it.
 
 I am being told by my internal Developers that Requirement # 1
 involves exposing my Jenkins server to the 1000+ GitHub IPs [as
 documented below]:
 https://help.github.com/articles/what-ip-addresses-does-github-use-that-i-should-whitelist
 
 The most secure of the two options [HTTPS with HTTP Basic Auth]
 presented at the above link has me confused though... Where do we
 configure the username and password for the HTTPS with HTTP Basic
 Auth in GitHub? I know how to configure it on my end, but how do I
 tell GitHub about it - so that the GitHub POST to my Jenkins server
 will actually succeed?

Put a reverse HTTP proxy in front of Jenkins that allows anyone
anonymous access to /github-webhook and nothing else.

Supposedly this is secure (the GitHub plugin doesn't trust the data
submitted but just extracts the repository name and polls it to see
whether there were any real changes).

Excerpt from my Apache config:

  Location /
AuthType Basic
AuthName jenkins.example.com
AuthUserFile /etc/apache2/htpasswd
Require valid-user
  /Location
  Location /github-webhook
# 
https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin#GitHubPlugin-SecurityImplications
# says it's fine
Allow from all
Satisfy Any
  /Location

 Also, is there any way to meet the above requirements without
 exposing my Jenkins server to GitHub?

You only need that one endpoint and only for your requirement (1).

 Please let me know how most folks meet the aforementioned
 requirements - as I am told that this is already a solved problem
 for many shops.
 
 BTW, we are pretty certain that we will need the following plugin:
 https://wiki.jenkins-ci.org/display/JENKINS/Github+pull+request+builder+plugin
 
 However, I am not quite sure how to leverage it at the moment.

(I haven't used it yet.)

Marius Gedminas
-- 
When the grammar checker identifies an error,
it suggests a correction and can even makes
some changes for you.
-- Microsoft Word for Windows 2.0 User's Guide.


signature.asc
Description: Digital signature


Jenkins/GitHub integration

2014-09-12 Thread Mike Seda

Hi All,
I am a Systems Administrator who was recently asked to perform a 
Jenkins/GitHub integration.


The requirements are...

1) When a GitHub pull request is made, start a Jenkins build.
2) Tell GitHub through the APIs that a Jenkins build is running.
3) When the Jenkins build finishes, inform GitHub that the Jenkins build 
succeeded/failed.
4) Update the GitHub pull request with a comment containing the URL of 
the webapp built for the branch after having deployed it.


I am being told by my internal Developers that Requirement # 1 involves 
exposing my Jenkins server to the 1000+ GitHub IPs [as documented below]:

https://help.github.com/articles/what-ip-addresses-does-github-use-that-i-should-whitelist

The most secure of the two options [HTTPS with HTTP Basic Auth] 
presented at the above link has me confused though... Where do we 
configure the username and password for the HTTPS with HTTP Basic Auth 
in GitHub? I know how to configure it on my end, but how do I tell 
GitHub about it - so that the GitHub POST to my Jenkins server will 
actually succeed?


Also, is there any way to meet the above requirements without exposing 
my Jenkins server to GitHub?


Please let me know how most folks meet the aforementioned requirements - 
as I am told that this is already a solved problem for many shops.


BTW, we are pretty certain that we will need the following plugin:
https://wiki.jenkins-ci.org/display/JENKINS/Github+pull+request+builder+plugin

However, I am not quite sure how to leverage it at the moment.

Please advise.

Thanks,
Mike

--
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-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins GitHub Integration

2013-12-25 Thread Balasubramaniyan Kannan
Did you guys get a solution for this issue. 

Thanks,
Bala

On Sunday, September 23, 2012 9:52:02 PM UTC+8, Ramesh Ankam wrote:

 Hello Group,
  
 I installed Jenkins 1.4.x on Linux/Tomcat6. We have our code base in 
 GitHub, we are unable to get clone the workspace for public and private 
 GitHub repositories. I receive following error when repo url is added to 
 Git option in Source Control. Any suggestions on how to fix the problem.
  
 Failed to connect to repository : Error performing command: ls-remote -h 
 https://github.com/wakaleo/game-of-life.git HEAD
  
 Thanks,
 Ramesh Ankam
 Loading...


-- 
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-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Jenkins GitHub Integration

2013-12-25 Thread Mark Waite
Since the message was sent 15 months ago, I assume they found a solution.
 Is there a reason you asked a question checking the status of question
opened 15 months ago?

In case others see the problem, I would first check if a correct path is
configured for the git command.  The command should be git ls-remote ...,
not just ls-remote 

Mark Waite


On Wed, Dec 25, 2013 at 9:15 PM, Balasubramaniyan Kannan 
infobala...@gmail.com wrote:

 Did you guys get a solution for this issue.

 Thanks,
 Bala

 On Sunday, September 23, 2012 9:52:02 PM UTC+8, Ramesh Ankam wrote:

 Hello Group,

 I installed Jenkins 1.4.x on Linux/Tomcat6. We have our code base in
 GitHub, we are unable to get clone the workspace for public and private
 GitHub repositories. I receive following error when repo url is added to
 Git option in Source Control. Any suggestions on how to fix the problem.

  Failed to connect to repository : Error performing command: ls-remote
 -h https://github.com/wakaleo/game-of-life.git HEAD

 Thanks,
 Ramesh Ankam
 Loading...

  --
 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-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
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-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Jenkins GitHub Integration

2013-02-01 Thread Kyle Boon
You set up an ssh key with github but then you provided a url with HTTPS as 
the protocol so your ssh key isn't being used. Use the SSH URL of your git 
repo and it should work without needing a username and password.

On Monday, January 28, 2013 2:23:20 PM UTC-6, Kevin Fleming wrote:

  You can create a .netrc file in the home directory of your Jenkins user 
 on the machine(s) where you are doing the git operations; this will allow 
 Git to perform HTTP authentication without actually prompting for a 
 username/password combination.

 --
 *From:*jenkins...@googlegroups.com javascript:*To:*
 jenkins...@googlegroups.com javascript:*Date:* 1/28 14:49
 --

  Hi,  

 I have the same issue with private repository. Hope someone can 
 provide a pointer.

 git version 1.7.9.5
 jenkins -- 1.500  
 Jenkins GIT plug -- 
 1.1.26http://ec2-50-18-85-116.us-west-1.compute.amazonaws.com:9090/pluginManager/plugin/git/thirdPartyLicenses
 GitHub plugin -- not available from the available plugins . This is 
 available from the previous version of Jenkins (1.499)
 ubuntu on AMS EC2 instance

 I have setup the ssh keys with the proper login name (email) to the 
 git hub. And put the public ssh key  to the github SSHKey. 
 Tested the  

 ssh -T g...@github.com javascript: 

works and authenticated. 

 in Jenkins, I selected the git as repository and put the github's 
 HTTPS URL. 

 With public repository, there is no problem; but with private 
 repository, I got the following error message: 


 Failed to connect to repository : Command git ls-remote -h 
 https://github.com//test.git HEAD returned status code 128:
 stdout: 
 stderr: fatal: Authentication failed


  I tried to the same command on the command line, 

   git ls-remote -h https://github.com//test.git 

 the command prompt me for the login and password, once I provides the 
 both, the commend returns me the refs results. 

 I can also git clone the above project from command line. 

 It looks to me that the Jenkins is complaining about the login and 
 password prompt.  

 I googled around and found one way to work around the issue is to 
 ssh-agent and use ssh-add to result this. but this requires start the 
 ssh-agent 
  
 

 is this the only way to do this, for sure I am not the first one to 
 connect the jenkins to  github's private repository.   Please help. 

 thanks
 Chester








 On Sunday, September 23, 2012 6:52:02 AM UTC-7, Ramesh Ankam wrote:

 Hello Group,
  
 I installed Jenkins 1.4.x on Linux/Tomcat6. We have our code base in 
 GitHub, we are unable to get clone the workspace for public and private 
 GitHub repositories. I receive following error when repo url is added to 
 Git option in Source Control. Any suggestions on how to fix the problem.
  
 Failed to connect to repository : Error performing command: ls-remote -h 
 https://github.com/wakaleo/game-of-life.git HEAD
  
 Thanks,
 Ramesh Ankam
 Loading...

  -- 
 You received this message because you are subscribed to the Google Groups 
 Jenkins Users group.
 To unsubscribe from this group, send email to 
 jenkinsci-use...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  


-- 
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-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Jenkins GitHub Integration

2013-01-29 Thread n8gray
For secure storage use a git credentials helper.  See this answer on SO:

http://stackoverflow.com/a/12938677/103934

On Monday, January 28, 2013 12:49:17 PM UTC-8, Chester Chen wrote:

 Kevin, 

 Thanks worked  
  The only draw back is that now I have the clear password in the 
 .netrc file. 

  very much appreciated. 

 Chester


 On Monday, January 28, 2013 12:37:30 PM UTC-8, Kevin Fleming wrote:

  The first hit in a Google search for git .netrc is:

 https://gist.github.com/1072829

 ... and it shows you exactly what to do.

 --
 *From:*che...@tingatech.com*To:*jenkins...@googlegroups.com*Cc:*KEVIN 
 FLEMING (BLOOMBERG/ 731 LEXIN)*Date:* 1/28 15:33
 --

  Kevin, 

   thanks for the reply, I am not familiar with .netrc, what should I put 
 into the .netrc file ? 


 Chester


 On Monday, January 28, 2013 12:23:20 PM UTC-8, Kevin Fleming wrote:

  You can create a .netrc file in the home directory of your Jenkins 
 user on the machine(s) where you are doing the git operations; this will 
 allow Git to perform HTTP authentication without actually prompting for a 
 username/password combination.

 --
 *From:*jenkins...@googlegroups.com*To:*jenkins...@googlegroups.com*Date:
 * 1/28 14:49
 --

  Hi,  

 I have the same issue with private repository. Hope someone can 
 provide a pointer.

 git version 1.7.9.5
 jenkins -- 1.500  
 Jenkins GIT plug -- 
 1.1.26http://ec2-50-18-85-116.us-west-1.compute.amazonaws.com:9090/pluginManager/plugin/git/thirdPartyLicenses
 GitHub plugin -- not available from the available plugins . This 
 is available from the previous version of Jenkins (1.499)
 ubuntu on AMS EC2 instance

 I have setup the ssh keys with the proper login name (email) to the 
 git hub. And put the public ssh key  to the github SSHKey. 
 Tested the  

 ssh -T g...@github.com 

works and authenticated. 

 in Jenkins, I selected the git as repository and put the github's 
 HTTPS URL. 

 With public repository, there is no problem; but with private 
 repository, I got the following error message: 


 Failed to connect to repository : Command git ls-remote -h 
 https://github.com//test.git HEAD returned status code 128:
 stdout: 
 stderr: fatal: Authentication failed


  I tried to the same command on the command line, 

   git ls-remote -h https://github.com//test.git 

 the command prompt me for the login and password, once I provides 
 the both, the commend returns me the refs results. 

 I can also git clone the above project from command line. 

 It looks to me that the Jenkins is complaining about the login and 
 password prompt.  

 I googled around and found one way to work around the issue is to 
 ssh-agent and use ssh-add to result this. but this requires start the 
 ssh-agent 
  
 

 is this the only way to do this, for sure I am not the first one to 
 connect the jenkins to  github's private repository.   Please help. 

 thanks
 Chester








 On Sunday, September 23, 2012 6:52:02 AM UTC-7, Ramesh Ankam wrote:

 Hello Group,
  
 I installed Jenkins 1.4.x on Linux/Tomcat6. We have our code base in 
 GitHub, we are unable to get clone the workspace for public and private 
 GitHub repositories. I receive following error when repo url is added to 
 Git option in Source Control. Any suggestions on how to fix the problem.
  
 Failed to connect to repository : Error performing command: ls-remote 
 -h https://github.com/wakaleo/game-of-life.git HEAD
  
 Thanks,
 Ramesh Ankam
 Loading...

  -- 
 You received this message because you are subscribed to the Google 
 Groups Jenkins Users group.
 To unsubscribe from this group, send email to 
 jenkinsci-use...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  



-- 
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-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Jenkins GitHub Integration

2013-01-28 Thread Chester Chen
Hi,  

I have the same issue with private repository. Hope someone can provide 
a pointer.

git version 1.7.9.5
jenkins -- 1.500  
Jenkins GIT plug -- 
1.1.26http://ec2-50-18-85-116.us-west-1.compute.amazonaws.com:9090/pluginManager/plugin/git/thirdPartyLicenses
GitHub plugin -- not available from the available plugins . This is 
available from the previous version of Jenkins (1.499)
ubuntu on AMS EC2 instance

I have setup the ssh keys with the proper login name (email) to the git 
hub. And put the public ssh key  to the github SSHKey. 
Tested the  

ssh -T g...@github.com 

   works and authenticated. 

in Jenkins, I selected the git as repository and put the github's HTTPS 
URL. 

With public repository, there is no problem; but with private 
repository, I got the following error message: 


Failed to connect to repository : Command git ls-remote -h 
https://github.com//test.git HEAD returned status code 128:
stdout: 
stderr: fatal: Authentication failed


 I tried to the same command on the command line, 

  git ls-remote -h https://github.com//test.git 

the command prompt me for the login and password, once I provides the 
both, the commend returns me the refs results. 

I can also git clone the above project from command line. 

It looks to me that the Jenkins is complaining about the login and 
password prompt.  

I googled around and found one way to work around the issue is to 
ssh-agent and use ssh-add to result this. but this requires start the 
ssh-agent 
 


is this the only way to do this, for sure I am not the first one to 
connect the jenkins to  github's private repository.   Please help. 

thanks
Chester








On Sunday, September 23, 2012 6:52:02 AM UTC-7, Ramesh Ankam wrote:

 Hello Group,
  
 I installed Jenkins 1.4.x on Linux/Tomcat6. We have our code base in 
 GitHub, we are unable to get clone the workspace for public and private 
 GitHub repositories. I receive following error when repo url is added to 
 Git option in Source Control. Any suggestions on how to fix the problem.
  
 Failed to connect to repository : Error performing command: ls-remote -h 
 https://github.com/wakaleo/game-of-life.git HEAD
  
 Thanks,
 Ramesh Ankam
 Loading...


-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group, send email to 
jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Jenkins GitHub Integration

2013-01-28 Thread KEVIN FLEMING (BLOOMBERG/ 731 LEXIN)
You can create a .netrc file in the home directory of your Jenkins user on the 
machine(s) where you are doing the git operations; this will allow Git to 
perform HTTP authentication without actually prompting for a username/password 
combination.



- Original Message -
From: jenkinsci-users@googlegroups.com
To: jenkinsci-users@googlegroups.com
At: Jan 28 2013 14:49:46

Hi,  

I have the same issue with private repository. Hope someone can provide 
a pointer.

git version 1.7.9.5
jenkins -- 1.500  
Jenkins GIT plug -- 
1.1.26http://ec2-50-18-85-116.us-west-1.compute.amazonaws.com:9090/pluginManager/plugin/git/thirdPartyLicenses
GitHub plugin -- not available from the available plugins . This is 
available from the previous version of Jenkins (1.499)
ubuntu on AMS EC2 instance

I have setup the ssh keys with the proper login name (email) to the git 
hub. And put the public ssh key  to the github SSHKey. 
Tested the  

ssh -T g...@github.com 

   works and authenticated. 

in Jenkins, I selected the git as repository and put the github's HTTPS 
URL. 

With public repository, there is no problem; but with private 
repository, I got the following error message: 


Failed to connect to repository : Command git ls-remote -h 
https://github.com//test.git HEAD returned status code 128:
stdout: 
stderr: fatal: Authentication failed


 I tried to the same command on the command line, 

  git ls-remote -h https://github.com//test.git 

the command prompt me for the login and password, once I provides the 
both, the commend returns me the refs results. 

I can also git clone the above project from command line. 

It looks to me that the Jenkins is complaining about the login and 
password prompt.  

I googled around and found one way to work around the issue is to 
ssh-agent and use ssh-add to result this. but this requires start the 
ssh-agent 
 


is this the only way to do this, for sure I am not the first one to 
connect the jenkins to  github's private repository.   Please help. 

thanks
Chester








On Sunday, September 23, 2012 6:52:02 AM UTC-7, Ramesh Ankam wrote:

 Hello Group,
  
 I installed Jenkins 1.4.x on Linux/Tomcat6. We have our code base in 
 GitHub, we are unable to get clone the workspace for public and private 
 GitHub repositories. I receive following error when repo url is added to 
 Git option in Source Control. Any suggestions on how to fix the problem.
  
 Failed to connect to repository : Error performing command: ls-remote -h 
 https://github.com/wakaleo/game-of-life.git HEAD
  
 Thanks,
 Ramesh Ankam
 Loading...


-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group, send email to 
jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group, send email to 
jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Jenkins GitHub Integration

2013-01-28 Thread Chester Chen
Kevin, 

  thanks for the reply, I am not familiar with .netrc, what should I put 
into the .netrc file ? 


Chester


On Monday, January 28, 2013 12:23:20 PM UTC-8, Kevin Fleming wrote:

  You can create a .netrc file in the home directory of your Jenkins user 
 on the machine(s) where you are doing the git operations; this will allow 
 Git to perform HTTP authentication without actually prompting for a 
 username/password combination.

 --
 *From:*jenkins...@googlegroups.com javascript:*To:*
 jenkins...@googlegroups.com javascript:*Date:* 1/28 14:49
 --

  Hi,  

 I have the same issue with private repository. Hope someone can 
 provide a pointer.

 git version 1.7.9.5
 jenkins -- 1.500  
 Jenkins GIT plug -- 
 1.1.26http://ec2-50-18-85-116.us-west-1.compute.amazonaws.com:9090/pluginManager/plugin/git/thirdPartyLicenses
 GitHub plugin -- not available from the available plugins . This is 
 available from the previous version of Jenkins (1.499)
 ubuntu on AMS EC2 instance

 I have setup the ssh keys with the proper login name (email) to the 
 git hub. And put the public ssh key  to the github SSHKey. 
 Tested the  

 ssh -T g...@github.com javascript: 

works and authenticated. 

 in Jenkins, I selected the git as repository and put the github's 
 HTTPS URL. 

 With public repository, there is no problem; but with private 
 repository, I got the following error message: 


 Failed to connect to repository : Command git ls-remote -h 
 https://github.com//test.git HEAD returned status code 128:
 stdout: 
 stderr: fatal: Authentication failed


  I tried to the same command on the command line, 

   git ls-remote -h https://github.com//test.git 

 the command prompt me for the login and password, once I provides the 
 both, the commend returns me the refs results. 

 I can also git clone the above project from command line. 

 It looks to me that the Jenkins is complaining about the login and 
 password prompt.  

 I googled around and found one way to work around the issue is to 
 ssh-agent and use ssh-add to result this. but this requires start the 
 ssh-agent 
  
 

 is this the only way to do this, for sure I am not the first one to 
 connect the jenkins to  github's private repository.   Please help. 

 thanks
 Chester








 On Sunday, September 23, 2012 6:52:02 AM UTC-7, Ramesh Ankam wrote:

 Hello Group,
  
 I installed Jenkins 1.4.x on Linux/Tomcat6. We have our code base in 
 GitHub, we are unable to get clone the workspace for public and private 
 GitHub repositories. I receive following error when repo url is added to 
 Git option in Source Control. Any suggestions on how to fix the problem.
  
 Failed to connect to repository : Error performing command: ls-remote -h 
 https://github.com/wakaleo/game-of-life.git HEAD
  
 Thanks,
 Ramesh Ankam
 Loading...

  -- 
 You received this message because you are subscribed to the Google Groups 
 Jenkins Users group.
 To unsubscribe from this group, send email to 
 jenkinsci-use...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  


-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group, send email to 
jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Jenkins GitHub Integration

2013-01-28 Thread KEVIN FLEMING (BLOOMBERG/ 731 LEXIN)
The first hit in a Google search for git .netrc is:

https://gist.github.com/1072829

... and it shows you exactly what to do.



- Original Message -
From: ches...@tingatech.com
To: jenkinsci-users@googlegroups.com
Cc: KEVIN FLEMING (BLOOMBERG/ 731 LEXIN)
At: Jan 28 2013 15:33:30

Kevin, 

  thanks for the reply, I am not familiar with .netrc, what should I put 
into the .netrc file ? 


Chester


On Monday, January 28, 2013 12:23:20 PM UTC-8, Kevin Fleming wrote:

  You can create a .netrc file in the home directory of your Jenkins user 
 on the machine(s) where you are doing the git operations; this will allow 
 Git to perform HTTP authentication without actually prompting for a 
 username/password combination.

 --
 *From:*jenkins...@googlegroups.com javascript:*To:*
 jenkins...@googlegroups.com javascript:*Date:* 1/28 14:49
 --

  Hi,  

 I have the same issue with private repository. Hope someone can 
 provide a pointer.

 git version 1.7.9.5
 jenkins -- 1.500  
 Jenkins GIT plug -- 
 1.1.26http://ec2-50-18-85-116.us-west-1.compute.amazonaws.com:9090/pluginManager/plugin/git/thirdPartyLicenses
 GitHub plugin -- not available from the available plugins . This is 
 available from the previous version of Jenkins (1.499)
 ubuntu on AMS EC2 instance

 I have setup the ssh keys with the proper login name (email) to the 
 git hub. And put the public ssh key  to the github SSHKey. 
 Tested the  

 ssh -T g...@github.com javascript: 

works and authenticated. 

 in Jenkins, I selected the git as repository and put the github's 
 HTTPS URL. 

 With public repository, there is no problem; but with private 
 repository, I got the following error message: 


 Failed to connect to repository : Command git ls-remote -h 
 https://github.com//test.git HEAD returned status code 128:
 stdout: 
 stderr: fatal: Authentication failed


  I tried to the same command on the command line, 

   git ls-remote -h https://github.com//test.git 

 the command prompt me for the login and password, once I provides the 
 both, the commend returns me the refs results. 

 I can also git clone the above project from command line. 

 It looks to me that the Jenkins is complaining about the login and 
 password prompt.  

 I googled around and found one way to work around the issue is to 
 ssh-agent and use ssh-add to result this. but this requires start the 
 ssh-agent 
  
 

 is this the only way to do this, for sure I am not the first one to 
 connect the jenkins to  github's private repository.   Please help. 

 thanks
 Chester








 On Sunday, September 23, 2012 6:52:02 AM UTC-7, Ramesh Ankam wrote:

 Hello Group,
  
 I installed Jenkins 1.4.x on Linux/Tomcat6. We have our code base in 
 GitHub, we are unable to get clone the workspace for public and private 
 GitHub repositories. I receive following error when repo url is added to 
 Git option in Source Control. Any suggestions on how to fix the problem.
  
 Failed to connect to repository : Error performing command: ls-remote -h 
 https://github.com/wakaleo/game-of-life.git HEAD
  
 Thanks,
 Ramesh Ankam
 Loading...

  -- 
 You received this message because you are subscribed to the Google Groups 
 Jenkins Users group.
 To unsubscribe from this group, send email to 
 jenkinsci-use...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  


-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group, send email to 
jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Jenkins GitHub Integration

2013-01-28 Thread Chester Chen
Kevin, 

Thanks worked  
 The only draw back is that now I have the clear password in the .netrc 
file. 

 very much appreciated. 

Chester


On Monday, January 28, 2013 12:37:30 PM UTC-8, Kevin Fleming wrote:

  The first hit in a Google search for git .netrc is:

 https://gist.github.com/1072829

 ... and it shows you exactly what to do.

 --
 *From:*che...@tingatech.com 
 javascript:*To:*jenkins...@googlegroups.comjavascript:
 *Cc:*KEVIN FLEMING (BLOOMBERG/ 731 LEXIN)*Date:* 1/28 15:33
 --

  Kevin, 

   thanks for the reply, I am not familiar with .netrc, what should I put 
 into the .netrc file ? 


 Chester


 On Monday, January 28, 2013 12:23:20 PM UTC-8, Kevin Fleming wrote:

  You can create a .netrc file in the home directory of your Jenkins user 
 on the machine(s) where you are doing the git operations; this will allow 
 Git to perform HTTP authentication without actually prompting for a 
 username/password combination.

 --
 *From:*jenkins...@googlegroups.com*To:*jenkins...@googlegroups.com*Date:* 
 1/28 
 14:49
 --

  Hi,  

 I have the same issue with private repository. Hope someone can 
 provide a pointer.

 git version 1.7.9.5
 jenkins -- 1.500  
 Jenkins GIT plug -- 
 1.1.26http://ec2-50-18-85-116.us-west-1.compute.amazonaws.com:9090/pluginManager/plugin/git/thirdPartyLicenses
 GitHub plugin -- not available from the available plugins . This is 
 available from the previous version of Jenkins (1.499)
 ubuntu on AMS EC2 instance

 I have setup the ssh keys with the proper login name (email) to the 
 git hub. And put the public ssh key  to the github SSHKey. 
 Tested the  

 ssh -T g...@github.com 

works and authenticated. 

 in Jenkins, I selected the git as repository and put the github's 
 HTTPS URL. 

 With public repository, there is no problem; but with private 
 repository, I got the following error message: 


 Failed to connect to repository : Command git ls-remote -h 
 https://github.com//test.git HEAD returned status code 128:
 stdout: 
 stderr: fatal: Authentication failed


  I tried to the same command on the command line, 

   git ls-remote -h https://github.com//test.git 

 the command prompt me for the login and password, once I provides the 
 both, the commend returns me the refs results. 

 I can also git clone the above project from command line. 

 It looks to me that the Jenkins is complaining about the login and 
 password prompt.  

 I googled around and found one way to work around the issue is to 
 ssh-agent and use ssh-add to result this. but this requires start the 
 ssh-agent 
  
 

 is this the only way to do this, for sure I am not the first one to 
 connect the jenkins to  github's private repository.   Please help. 

 thanks
 Chester








 On Sunday, September 23, 2012 6:52:02 AM UTC-7, Ramesh Ankam wrote:

 Hello Group,
  
 I installed Jenkins 1.4.x on Linux/Tomcat6. We have our code base in 
 GitHub, we are unable to get clone the workspace for public and private 
 GitHub repositories. I receive following error when repo url is added to 
 Git option in Source Control. Any suggestions on how to fix the problem.
  
 Failed to connect to repository : Error performing command: ls-remote -h 
 https://github.com/wakaleo/game-of-life.git HEAD
  
 Thanks,
 Ramesh Ankam
 Loading...

  -- 
 You received this message because you are subscribed to the Google Groups 
 Jenkins Users group.
 To unsubscribe from this group, send email to 
 jenkinsci-use...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  



-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Users group.
To unsubscribe from this group, send email to 
jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Jenkins GitHub Integration

2012-09-23 Thread Ramesh Ankam
Hello Group,
 
I installed Jenkins 1.4.x on Linux/Tomcat6. We have our code base in 
GitHub, we are unable to get clone the workspace for public and private 
GitHub repositories. I receive following error when repo url is added to 
Git option in Source Control. Any suggestions on how to fix the problem.
 
Failed to connect to repository : Error performing command: ls-remote -h 
https://github.com/wakaleo/game-of-life.git HEAD
 
Thanks,
Ramesh Ankam
Loading...