ArtiFactory的Nuget repo带有路径:它适用于推送,但不适用于安装 [英] Artifactory's nuget repo with a path: it works for push but not for install

查看:0
本文介绍了ArtiFactory的Nuget repo带有路径:它适用于推送,但不适用于安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的%用户配置文件%appdataRoaming UgetNuGet.Config包含:

<configuration>
  <packageSources>
    <add key="rt1" value="https://my-server.com/artifactory/api/nuget/nuget-local" />
    <add key="rt2" value="https://my-server.com/artifactory/api/nuget/nuget-local/rt2" />
  </packageSources>

现在推送适用于两者,但安装仅适用于RT1。

nuget push My.Package.1.0.0.nupkg -source rt1  # works
nuget push My.Package.1.0.0.nupkg -source rt2  # works
nuget install My.Package                       # DOES NOT WORK IF I HAVE rt2 as source

OK https://my-server.com/artifactory/api/nuget/nuget-local/FindPackagesById()?id='My.Package'&semVerLevel=2.0.0 154ms

An error occurred while retrieving package metadata for 'My.Package' from source 'rt2'.
  Failed to fetch results from V2 feed at 'https://my-server.com/artifactory/api/nuget/nuget-local/rt2/FindPackagesById()?id='My.Package'&semVerLevel=2.0.0' with following message : Response status code does not indicate success: 405 (Method Not Allowed).
  Response status code does not indicate success: 405 (Method Not Allowed).

这是预期行为吗?Nuget似乎希望FindPackagesById()在repo url上可用于安装操作,但在rt2上失败。

有没有什么方法可以将路径用作源,而不使用包含/排除配置创建虚拟存储库?jfrog nugetCLI会给我不同的行为吗?

我发现它在jFrog:https://www.jfrog.com/jira/browse/RTFACT-23310中也被询问过,但没有任何解释就标记为不是Bug。

推荐答案

有人向ArtiFactory/JFrog提交了问题,但他们将其关闭,因为它不是错误:https://www.jfrog.com/jira/browse/RTFACT-23310

因此,从ArtiFactory拉取作为Nuget源时,显然不支持使用包路径(即使在推送时支持)。

这篇关于ArtiFactory的Nuget repo带有路径:它适用于推送,但不适用于安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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