Need help in jenkins following error appearing, when i am creating new item/job gitpull topcat apache
Failed to connect to repository : Error performing git command: git.exe ls-remote -h https://github.com/vishambardutt/samplewebapp.git HEAD
jenkins, job/item creation in tomcat
Related
I created a Jenkins Free Style Project to run a Rest assured Serenity Test Framework with Java.
When I click on Build Button in my Jenkins Job,
I get this error.
> git config core.sparseheckout # timeout=10
> git checkout -f 22227b72dd8derfgtxc7b72dd8derfgtxc7b72dd8derfgtxc # timeout=10
FATAL: Could not checkout 22227b72dd8derfgtxc7b72dd8derfgtxc7b72dd8derfgtxc
hudson.plugins.git.GitException: Command "git checkout -f 22227b72dd8derfgtxc7b72dd8derfgtxc7b72dd8derfgtxc" returned status code 128:
stdout:
stderr: error: unable to create file src/main/resources/apiRequest//createLoa/Associdksjdksjdksjdksjdksdjjdkjdks.json: Filename too long
error: unable to create file
I know that file name is too long,
I am using SHELL option as a build step with below given parameters
export MAVEN_HOME=/opt/maven
export PATH=$PATH:$MAVEN_HOME/bin
mvn --version
mvn clean package
mvn clean install
can I add something here to resolve this error? Please suggest an alternative
I am adding Git repository to Jenkins in Source code management it throwing error Failed to connect to repository:
Error performing git command: git.exe ls-remote -h
localhost:8080/configureTools, path to git executable C:\Program Files\Git\bin\git.exe
I have created a Jenkins' job to clone, build and deploy the code on tomcat server. But every time I run the job it ends exactly after 10 mins with same error
10:57:59 ERROR: Error cloning remote repo 'origin'
10:57:59 [DeployPublisher][INFO] Build failed, project not deployed
10:57:59 Finished: FAILURE
I know the root cause which is timeout is set to 10 min by default while jenkins job triggers the clone command
10:47:57 > git.exe --version # timeout=10
10:47:58 > git.exe fetch --tags --force --progress -- repository-url +refs/heads/*:refs/remotes/origin/* # timeout=10
10:57:58 ERROR: Timeout after 10 minutes
10:57:59 ERROR: Error cloning remote repo 'origin'
What I couldn't figure out is how to increase this default timeout.
Followings are the list of Git plugins that I have been using
Plugins used
Any help would be appreciated. Thanks in Advance
I have looked into Jenkins documentation and found few Keywords and searching with them, ends up to the answer of my question.
Please refer to this for answer
Installed Jenkins and git on windows machine. when trying to set URL under source code management following error shown:
PATH enviornment variable
C:\Users\user\AppData\Local\Programs\Git\bin
Jenkins->ManageJenkins->global tool configuration-> git path set it as C:\Users\user\AppData\Local\Programs\Git
while trying to set URL as below:
https://github.com/User/EmployeeApp error shown below:
Failed to connect to repository : Error performing git command: C:\Users\user\AppData\Local\Programs\Git ls-remote -h https://github.com/user/EmployeeApp/ HEAD
Please help me to resolve this error !
Resolved by adding this
Jenkins -> Manage Jenkins -> global tool configuration
under Git
PATH to executable git -> C:\Users\user\AppData\Local\Programs\Git\bin\git.exe
cheers!
I have installed jenkins on my centos7 server and tried to build a maven build. Created a new maven build job and in SCM I was trying to pull the code from github but it showed me an error like...
Failed to connect to repository : Command "git ls-remote -h https://github.com/example.git HEAD" returned status code 128: stdout: stderr: remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/example.git/'
And also I setup an SSH public keys to my github. I don't know how to solve this. Anyone help me.Thanks in advance.
also I setup an SSH public keys to my github
That would have zero impact on an HTTPS URL: the SSH key is ignored.
Check if you havbe a git credential helper in place which might cache your credentials (GitHub username/password)
git config credential.helper
For instance, it could be 'cache'.
I would recommend (as in this answer) to set it to gnome-keyring:
git config --global credential.helper gnome-keyring
Then try again your git ls-remote, from command-line:
git ls-remote https://<yourUsername>#github.com/<yourUsername>/<yourRepo.git>
That should prompt for your GitHub username/password. Once entered, a second git ls-remote should not ask again for your credentials.
From there, an SCM process from your Jenkins, as long as said Jenkins runs with your account, should work.