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.
I am able to successfully host the maven repo by following the steps mentioned here. However, I am unable to link this repo as a dependency in my other projects.
In an answer to another question here, 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 ~/.m2/settings.xml
while resolving the dependencies.
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
curl -uazitabh https://github.com/azitabh/test/raw/mvn-repo/test-1/test-1/0.0.11/test-1-0.0.11.jar
Doing the following results in {"error":"Not Found"}
curl -uazitabh https://github.com/ANOTHER-USER/test/raw/mvn-repo/test-1/test-1/0.0.11/test-1-0.0.11.jar
Permissions are alright as I can very well download the jar file using the same link in the browser when I am logged in.
How to get the dependency resolution bit working?