Jenkins and Git integration on local git server Jenkins and Git integration on local git server jenkins jenkins

Jenkins and Git integration on local git server


I have created an empty repo at /home/git/repositories/TestProject

How?

A git init /home/git/repositories/TestProject should create a .git folder in the TestProject folder, and a git -C /home/git/repositories/TestProject status should return a status.

If you don't see a .git folder in /home/git/repositories/TestProject, that would explain the error message.

The other reason is an access issue.
The OP Saichovsky confirms in the comments:

/home/git was owned by root.
Looks like the jenkins user ought to have read permissions on all parent (or grandparent) directories.


Git expects a "remote" repository (no matter how remote it is) to be a bare git repo (created with git init --bare, it does not have working copy in it)

You may try to point to .git folder inside your repo, but better get yourself a proper set bare one.