无法从Artifactory中托管的NuGet流中找到包 [英] Cannot find package from NuGet stream hosted in Artifactory

查看:274
本文介绍了无法从Artifactory中托管的NuGet流中找到包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我们建立了一个Artifactory,以便为我们的团队共享不同的资源,当然其中一个就是NuGet软件包.现在,我对Artifactory非常陌生,我的一个队友在Artifactory上上传了一个NuGet程序包,并提供了如下流地址:

So we have an Artifactory set up to share different resources for our team and one of them ofcourse being NuGet packages. Now, I am very very new to Artifactory and one of my teammate uploaded a NuGet package on Artifactory and gave the stream address which looks like :

Http:/OurArtifactory/api/nuget/folder

我继续并将该URL添加为我的Visual Studio中的新NuGet源. Visual Studio将该地址添加为有效来源.到目前为止,一切都很好.现在,当我在VS中进入NuGet软件包管理器的browse窗口时,我期望看到的是我在Artifactory中托管的一个软件包.但是当我在那个窗口上时,看不到任何包裹.

I went ahead and added that URL as a new NuGet source on my visual studio. And Visual studio added that address as a valid source. So far so good. Now, when I go to the browse window of NuGet Package manager in my VS, I was expecting to see that one package which I see hosted in Artifactory. But I do not see any package when I am on that window.

现在,由于这是经过身份验证的服务器,因此我意识到必须在这里设置我的安全凭证.我使用以下命令完成的操作:

Now, since this is an authenticated server, I realized that I have to set my security credentials here. Which I did using following commands:

nuget setapikey [apikey] -source [feedUrl] nuget sources add|update -Name [name] -source [feedUrl] -User [username] -pass [password]

nuget setapikey [apikey] -source [feedUrl] nuget sources add|update -Name [name] -source [feedUrl] -User [username] -pass [password]

我也在这里尝试供应

  • 该命令的password字段中的常规密码,加密密码以及API KEy,但似乎没有任何作用.
  • Regular password, encrypted password and also API KEy in the password field of the command but nothing seems to be working.

现在,即使我设置了安全凭证,问题仍然存在.当我在创建-verbose标志的情况下请求详细日志时,我意识到的另一件事是,它肯定能够找到该流并从该流中获取OK,只是当它试图找到该程序包时,它却没有在流中找到包.我的日志如下所示:

Now, even after I set the security credentials, the problem remains. One more thing I realized when I requested verbose logs with creating -verbose flag on is that it is definitely able to find the stream and getting OK back from the stream, its just when it tries to find the package, then it does not find the package inside the stream. My logs looks like below:

install-package ArrayAnalysis.Data -verbose GET https://url/finbyId()' OK https://url/findbyid()' 5ms Install-Package : Unable to find package 'package.name' At line:1 char:16 + install-package <<<< ArrayAnalysis.Data -verbose + CategoryInfo : NotSpecified: (:) [Install-Package], Exception + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

install-package ArrayAnalysis.Data -verbose GET https://url/finbyId()' OK https://url/findbyid()' 5ms Install-Package : Unable to find package 'package.name' At line:1 char:16 + install-package <<<< ArrayAnalysis.Data -verbose + CategoryInfo : NotSpecified: (:) [Install-Package], Exception + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

我不确定是否应该做一些我想念的事情.有什么想法吗?

I am not sure if I am supposed to be doing something that I am missing. Any ideas?

推荐答案

当您要显示prelease版本或nuget feed仅具有预发行版软件包时,请确保选中包括预发行版"选项.

Please make sure that "Include prerelease" option is checked when you want to show a prelease version or you nuget feed only have prerelease packages.

如果要通过Nuget Package Manager控制台中的命令安装prelease版本,则必须指定详细版本.例如:

And if you want to install the prelease version via command in Nuget Package Manager Console, you have to specify the detailed version. For example:

install-package ClassLib -version 1.0.0-rtm

这篇关于无法从Artifactory中托管的NuGet流中找到包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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