title: Resolving Maven Dependency From Private Github Repo
body: <p>We have a JAVA library in our private github repository. We want to include this library into other JAVA projects as maven dependency. I am looking for a way to successfully host a maven repository inside my private github repo.</p>
  
  <p>I am able to successfully host the maven repo by following the steps mentioned <a href="https://stackoverflow.com/a/14013645/1230319">here</a>. However, I am unable to link this repo as a dependency in my other projects.</p>
  
  <p>In an answer to another question <a href="https://stackoverflow.com/a/14075151/1230319">here</a>, someone has mentioned that this is not possible anymore. But I am able to point to this repo when I make this repo public. This leads me to believe that maven is not using the credentials specified in <code>~/.m2/settings.xml</code> while resolving the dependencies.</p>
  
  <p>I somehow also believe that github is not supporting download of binary files hosted in private repo using basic http authentication. While I can successfully do</p>
  
  <pre><code>curl -uazitabh https://github.com/azitabh/test/raw/mvn-repo/test-1/test-1/0.0.11/test-1-0.0.11.jar
  </code></pre>
  
  <p>Doing the following results in <code>{"error":"Not Found"}</code></p>
  
  <pre><code>curl -uazitabh https://github.com/ANOTHER-USER/test/raw/mvn-repo/test-1/test-1/0.0.11/test-1-0.0.11.jar
  </code></pre>
  
  <p>Permissions are alright as I can very well download the jar file using the same link in the browser when I am logged in.</p>
  
  <p>How to get the dependency resolution bit working?</p>