title: Jenkins build from git repository in Dropbox
body: <p>I have a main Git bare repository in my Dropbox folder and I'm using a headless Debian server which runs Jenkins to build my projects.</p>
  
  <p>Until now I've been using this approach to build my projects: I created a bare git repository on my headless server and configured the Jenkins job to pull the sources from this repository with the following URL: <code>/var/cache/git/project</code>. So when I want Jenkins to build my changes, I have to push them to this repository. This works fine, but it's not very convenient because I have to manually push to two repositories (Dropbox and Debian) and also when I want to add a new project, I need to create a new repository on the Debian server.</p>
  
  <p>So I decided to configure the Jenkins jobs to pull directly from the Dropbox repositories. I've set up Dropbox on my Debian server at <code>/home/jardo/Dropbox</code>.</p>
  
  <p>But when I try to configure the Jenkins job to pull drom URL <code>/home/jardo/Dropbox/git/project.git</code>, I get the following error:</p>
  
  <p><strong>Failed to connect to repository : Command "git ls-remote -h /home/jardo/Dropbox/git/project.git HEAD" returned status code 128:
  stdout: 
  stderr: fatal: '/home/jardo/Dropbox/git/project.git' does not appear to be a git repository
  fatal: The remote end hung up unexpectedly</strong></p>
  
  <p>How come Jenkins is able to clone from <code>/var/cache/git/project</code>, but not from my Dropbox folder? Dropbox is completely synced and the repository content looks ok. I've set permissions on the whole repository recursively to 777 and that didn't help.</p>
  
  <p>Here is the output of ls -l on my Dropbox repository:</p>
  
  <pre><code>-rwxrwxrwx   1 jardo jardo  104 Dec 15 21:10 config
  -rwxrwxrwx   1 jardo jardo   73 Dec 15 21:10 description
  -rwxrwxrwx   1 jardo jardo   23 Dec 15 21:10 HEAD
  drwxrwxrwx   2 jardo jardo 4096 Dec 24 13:16 hooks
  drwxrwxrwx   2 jardo jardo 4096 Dec 24 13:01 info
  drwxrwxrwx 150 jardo jardo 4096 Dec 24 13:01 objects
  drwxrwxrwx   4 jardo jardo 4096 Dec 24 12:59 refs
  </code></pre>