11

I'm trying to store some of our private artifacts on Github and would like to access them as if they were part of a Maven repo. There are lots of pages that explain how to create a public Maven repo on Github: you just put the artifacts in the proper directory structure in your project, and then access them using a "raw" URL:

<repositories>
  <repository>
    <id>myrepo.myname.github.com</id>
    <url>https://github.com/myname/myproject/raw/master/repositories/releases/</url>
  </repository>
</repositories>   

So far, so good. Now the trouble is that I can't figure out how to access the repo if it's private. I've added a username and password to my settings.xml, but it doesn't work:

<servers>
    <server>
      <id>myrepo.myname.github.com</id>
      <username>myusername</username>
      <password>mypassword</password>
    </server>
 </servers>

What's the trick?

ccleve
  • 15,239
  • 27
  • 91
  • 157

2 Answers2

1

The question is now moot. Github has eliminated downloads. They don't host binaries any more. Probably because of exactly the kind of abuse I've proposed...

ccleve
  • 15,239
  • 27
  • 91
  • 157
0

You can access private repositories from Maven pom.xml using the following URL: https://api.github.com/users/username/repos?login=username&token=oauthtoken&repositoryname=reponame

arathim
  • 36
  • 5