Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github authentication: how to use Github as Maven repo when repo is private

Tags:

github

maven

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?

like image 910
ccleve Avatar asked Jul 06 '12 22:07

ccleve


People also ask

Is Maven Central free?

Public repositories store software artifacts that are free for the entire world to download. Maven and other build tools connect to public repositories to download dependencies used in software projects.


1 Answers

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...

like image 166
ccleve Avatar answered Oct 04 '22 21:10

ccleve