Github认证:当回购是私人时,如何使用Github作为Maven回购 [英] Github authentication: how to use Github as Maven repo when repo is private
问题描述
我试图在Github上存储我们的一些私人产品,并且想要访问它们,就好像它们是Maven回购的一部分一样。有很多页面解释了如何在Github上创建一个公共的Maven仓库:您只需将工件放在项目中的适当目录结构中,然后使用原始URL访问它们即可:
< repositories>
< repository>
< id> myrepo.myname.github.com< / id>
< url> https://github.com/myname/myproject/raw/master/repositories/releases/< / url>
< / repository>
< / repositories>
到目前为止,这么好。现在的麻烦是,我无法弄清楚如何访问回购,如果它是私人的。我已经在我的settings.xml中添加了用户名和密码,但它不起作用:
<服务器>
< server>
< id> myrepo.myname.github.com< / id>
<用户名> myusername< /用户名>
<密码> mypassword< /密码>
< / server>
< /服务器>
诀窍是什么?
现在的问题是没有意义的。 Github已经淘汰下载。他们不再主持二进制文件。可能是因为我提出的那种虐待......
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?
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...
这篇关于Github认证:当回购是私人时,如何使用Github作为Maven回购的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!