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:*[email protected] <javascript:>*To:*
> [email protected] <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.26<http://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 [email protected] <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/xxxx/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/xxxx/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 
> [email protected] <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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to