简体   繁体   English

是否可以通过Maven访问github私有存储库?

[英]is it posible to access github private repository via maven?

When i try to add dependency from a public github repository, its worked ok. 当我尝试从公共github存储库添加依赖项时,它的工作正常。 Example

<repository>
<id>https-levonk</id>
<url>https://github.com/levonk/pub-maven-repo/tree/master/release/</url>

<dependency>
<groupId>com.levonk</groupId>
<artifactId>codequality</artifactId>
<version>1.0.8</version>

But when i try to make it to private repository and add my github account via ~m2/settings.xml . 但是当我尝试将其添加到私有存储库并通过〜m2 ~m2/settings.xml添加我的github帐户时。 But It doesn't work. 但这行不通。

This has been answered in Github authentication: how to use Github as Maven repo when repo is private Github身份验证已经回答了这一问题:当仓库是私有的时,如何将Github用作Maven仓库

Though there are some suggestions on how to get this done, the below is the chosen answer. 尽管对完成此操作有一些建议,但以下是选择的答案。

The question is now moot. 现在的问题尚无定论。 Github has eliminated downloads. Github消除了下载。 They don't host binaries any more. 他们不再托管二进制文件。 Probably because of exactly the kind of abuse I've proposed... 可能是由于我所建议的那种虐待...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM