Hi I just want to configure my project from github to jenkins to generate build. I'm getting following error
Failed to connect to repository : Command "/usr/bin/git ls-remote -h
https://github.com/xxxxx/yyyyy.git HEAD"
returned status code 128:
stdout:
stderr: error: The requested URL returned error: 403 Forbidden while
accessing https://github.com/xxxxx/yyyyy.git/info/refs
fatal: HTTP request failed
I have added git path at Global Tool Configuration also. I've setup jenkins in linux centos server.
I have found few similar questions in stackoverflow but that doesn't give a solution
Can anyone please tell me what may be wrong in that ? Thanks in advance
There are a few possible causes for this problem: You typed an incorrect password. Make sure you are using the correct GitHub password for the account. The Git client on the A2 Hosting server requires a modified HTTPS URL to work correctly.
Step 1: go to your GitHub repository and click on 'Settings'. Step 2: Click on Webhooks and then click on 'Add webhook'. Step 3: In the 'Payload URL' field, paste your Jenkins environment URL. At the end of this URL add /github-webhook/.
Rectifying the “403 Forbidden” Error Message There are two methods to fix the HTTPS address to resolve the 403 error in question; Method 1. Use SSH to push the changes to GitHub. First, connect to your hosting server via SSH then follow the instructions Github provides to add a remote repository.
Install Jenkins Git PluginLogin to Jenkins UI using your admin account, and go to “Manage Jenkins” -> Manage Plugins -> Click on “Installed” Tab -> From here, search for “git plugin” in the filter. If the “Git plugin” is already installed, it will display it here as shown below.
A bit late, but this solutions works for me. Just change the URL from
https://github.com/xxxxx/yyyyy.git
to
https://[email protected]/xxxxx/yyyyy.git
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With