While I’m adding the path to my locally cloned repository to Repository URL field under the Pipeline tab, the following error shows up:
Failed to connect to repository : Command "git ls-remote -h -- /Users/shreya/Documents/GitHub/simple-java-maven-app HEAD" returned status code 128:
stdout:
stderr: fatal: '/Users/shreya/Documents/GitHub/simple-java-maven-app' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I’ve tried putting the path to Git executable in Manage Jenkins>Global Tools Configuration>Git>Git Installations as /usr/bin/git but this doesn’t work
changing the path to /home/Documents/GitHub/simple-java-maven-app doesn’t help either
I’m using jenkins through docker. can anyone help?
If you are using jenkins inside of docker, do you have /Users/shreya/Documents/GitHub/simple-java-maven-app as a volume (-v) in your docker run? otherwise docker can’t access that directory outside of your container.
It may be less effort to use a github repo instead of a cloned local repo and messing with volumes.
That message means that network requests to the geographically nearest mirror to you (Tsinghua University in China) are not receiving a response. My first guess would be that you are in a network that has decided to block access to sites in China. Most unfortunate that no one has donated a Jenkins mirror from a location that is nearer to you.
The best solution is to persuade your network provider to allow you to access that site.
If your network provider can’t be persuaded to allow you to access that site, then there are alternatives that you can explore.
If your network provider can’t be persuaded to allow you to access that site, then there are alternatives that you can explore.
could you lead me to the alternatives? I’m using my Institute’s WiFi network, won’t be possible to get access to the site. Other image builds for plugin dev environments are also failing with the same error.
Unfortunately, I’m not willing to spend the effort to do that. There are too many things that can and will go wrong in that experience.
You may want to tell your institute that their network policies have blocked you from contributing to the Jenkins open source project and that those same policies will block others at the institute from using Jenkins. Jenkins is used at many companies around the world. DevOps jobs frequently expect experience with Jenkins.