0

I've just installed Jenkins on a virtual machine using Ubuntu. I'm doing this all locally for the time being. I've set myself up as the administrator and added security features. I wanted to use a local Git repository to test if the system works correctly.

I created a JenkinsGit folder in my home directory and added a working HelloWorld.java file and a non-working HelloWorldErr.java file to see if the system can build and test the 2 files correctly.

I've also installed the Git plugin.

When I create a new item as a Freestyle project, I selected Git for source code management and entered file:///home/JenkinsGit as the Repository URL, but it gives me the error:

Failed to connect to repository : Error performing command: git ls-remote -h file:///home/JenkinsGit HEAD

I'm a novice with Linux, Jenkins and Git so I might be missing something pretty obvious here. Any help with this would be much appreciated!

Gerold Broser
  • 14,080
  • 5
  • 48
  • 107
fep92
  • 93
  • 8
  • I've also tried file:///home//JenkinsGit (as I noticed this should be what the directory is) and still no luck! – fep92 Jun 03 '16 at 11:41
  • This solved the problem, however, I have now run into a new problem... After running my test job I get an error message saying `returned status code 128: stdout: stderr: fatal: '/var/lib/jenkins/repo' does not appear to be a git repository fatal: The remote end hung up unexpectedly` – fep92 Jun 03 '16 at 14:23
  • Nevermind, sorted! – fep92 Jun 03 '16 at 14:55

0 Answers0