如何将Github原始存储库添加到Sonatype Nexus作为代理存储库? [英] How to add Github raw repositories to Sonatype Nexus as Proxy repository?

查看:883
本文介绍了如何将Github原始存储库添加到Sonatype Nexus作为代理存储库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在有很多github托管的Maven仓库。
ex) https://github.com/nhnopensource/nhnopensource.maven.repo



我尝试将这些存储库作为代理存储库添加到我的Sonatype Nexus存储库管理器中,但始终失败。



但是,当我将仓库URL直接设置到gradle / maven配置中的github仓库时,仓库工作正常。



有没有人成功地将github托管的maven仓库添加到Nexus?

解决方案

我找到了解决方案: https://github.com/sagemintblue/sagemintblue-repositories


如果您使用Sonatype的Nexus存储库管理器,可能需要将
代理条目添加到Sagemintblue
存储库的Nexus配置中。请注意以下几点:



Sagemintblue存储库不包含索引。您应该将Remote Repository Access>下载远程索引设置为false。



由于GitHub不会为原始存储库目录URL生成目录列表,因此Nexus会自动阻止代理$ b如果远程存储库访问>自动阻塞活动设置
为真,则为$ b存储库。将此选项设置为false并单击刷新。您应该看到
试图代理和远程不可用的存储库状态。尽管缺少目录列表,Nexus
应该仍然可以访问特定的工件,pom和校验码
的文件URL。


Nowadays there are a lot of github hosted Maven repositories. ex) https://github.com/nhnopensource/nhnopensource.maven.repo

I tried to add those repositories into my Sonatype Nexus repository manager as proxy repository, but failed all the time.

But the repositories work fine when I set repository url directly to the github repositories in gradle/maven configuration.

Has anybody succeeded to add github hosted maven repository into Nexus?

解决方案

I found the solution : https://github.com/sagemintblue/sagemintblue-repositories

If you use Sonatype's Nexus repository manager, you may want to add proxy entries to your Nexus configuration for the Sagemintblue repositories. Here are a few notes to keep in mind:

Sagemintblue repositories don't contain indices. You should set Remote Repository Access > Download Remote Indexes to false.

Because GitHub doesn't generate directory listings for raw repository directory URLs, Nexus will automatically block the proxied repositories if Remote Repository Access > Auto blocking active is set to true. Set this option to false and click Refresh. You should see a Repository Status of Attempting to Proxy and Remote Unavailable. Nexus should still be able to access specific artifact, pom and checksum file URLs despite the missing directory listings.

这篇关于如何将Github原始存储库添加到Sonatype Nexus作为代理存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆