I am attempting to use a private Github repository as a Maven repository, following the instructions on this page: Hosting a Maven Repository in Github
I am able to deploy properly, and I can see the artifacts (jars, poms, etc.) deploying to the Github repo.
What is not working is using this repository to pull dependencies from. In the log, I can see the pom attempting to be downloaded, but it is failing.
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://raw.githubusercontent.com/ORGANIZATION/mvn-repo/master/ with username=randymay, password=***
Downloading: https://raw.githubusercontent.com/ORGANIZATION/mvn-repo/master/org/hibernate/hibernate/3.2.7.patched/hibernate-3.2.7.patched.pom
[WARNING] The POM for org.hibernate:hibernate:jar:3.2.7.patched is missing, no dependency information available
If I use that URL in a curl request (with Basic Authentication), I am able to download the pom.
curl -v https://randymay:*****@raw.githubusercontent.com/ORGANIZATION/mvn-repo/master/org/hibernate/hibernate/3.2.7.patched/hibernate-3.2.7.patched.pom
Further in the log, it is actually attempting to download the jar:
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://raw.githubusercontent.com/ORGANIZATION/mvn-repo/master/ with username=randymay, password=***
Downloading: https://raw.githubusercontent.com/ORGANIZATION/mvn-repo/master/org/hibernate/hibernate/3.2.7.patched/hibernate-3.2.7.patched.jar
Could not find artifact org.hibernate:hibernate:jar:3.2.7.patched in github (https://raw.githubusercontent.com/ORGANIZATION/mvn-repo/master/)
Here is the repositories section of my pom.xml:
<repositories>
<!-- Repositories -->
<repository>
<id>github</id>
<url>https://raw.githubusercontent.com/ORGANIZATION/mvn-repo/master/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
</repository>
</repositories>
Here is my server entry in settings.xml:
<server>
<id>github</id>
<username>randymay</username>
<password>*****</password>
</server>
Please note that in the referenced article, they used the 'raw.github.com' domain. I tried that at first, and received the same problem. When I used curl to connect to that domain, I received a 'moved permanently' error. I am using 'raw.githubusercontent.com' as that is the url that I am able to successfully use curl with. If this is not correct, please let me know.
Any help would be much appreciated. Thanks in advance.