Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-24221

Specific version with v3 from Nuget.org using Virtual repository does not work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Affects Version/s: 6.20.0
    • Fix Version/s: 7.15.3
    • Component/s: NuGet
    • Labels:
      None

      Description

      When downloading a specific version with v3 from Nuget.org  using Virtual repository (with remote it works, with virtual it fails).

      This leads us to think that the issue is with aggregating the metadata in virtual repositories for V3.

       

      Steps to reproduce

      1.set Nuget.config with only v3

      <?xml version="1.0" encoding="utf-8"?>
      <configuration>
        <packageSources>
          <add key="ArtifactoryNuGetV3" value="http://172.16.2.31:8081/artifactory/api/nuget/v3/nuget" protocolVersion="3" />
        </packageSources>
        <apikeys>
          <add key="http://172.16.2.31:8081/artifactory/api/nuget/v3/nuget" value= RESTRICTED_API1 />
        </apikeys>
        <packageSourceCredentials>
          <Artifactory>
          </Artifactory>
        </packageSourceCredentials>
      </configuration>
      

      2. run the following command.

      nuget install log4net.Ext.Json -Version 2.0.8.3 -Source ArtifactoryNuGetV3

      Feeds used:
        /Users/davids/.nuget/packages/
        http://172.16.2.31:8081/artifactory/api/nuget/v3/nuget
      
      
      Attempting to gather dependency information for package 'log4net.Ext.Json.2.0.8.3' with respect to project '/Users/davids/Desktop/nuget_v3', targeting 'Any,Version=v0.0'
      Please provide credentials for: http://172.16.2.31:8081/artifactory/api/nuget/v3/nuget
      UserName: admin
      Password: *********
      Package 'log4net.Ext.Json 2.0.8.3' is not found in the following primary source(s): '/Users/davids/.nuget/packages/,http://172.16.2.31:8081/artifactory/api/nuget/v3/nuget'. Please verify all your online package sources are available (OR) package id, version are specified correctly.

       

      There are two workarounds

      1. set nuget-remote instead of nuget virtual repo as following.

       

      <?xml version="1.0" encoding="utf-8"?>
      <configuration>
        <packageSources>
          <add key="ArtifactoryNuGetV3" value="http://172.16.2.31:8081/artifactory/api/nuget/v3/nuget-remote" protocolVersion="3" />
        </packageSources>
        <apikeys>
          <add key="http://172.16.2.31:8081/artifactory/api/nuget/v3/nuget-remote" value= RESTRICTED_API1 />
        </apikeys>
        <packageSourceCredentials>
          <Artifactory>
          </Artifactory>
        </packageSourceCredentials>
      </configuration>
      

       

      or

      2. add v2 configure on top of v3 only with nuget virtual repo without nuget-remote as following.

      <?xml version="1.0" encoding="utf-8"?>
      <configuration>
        <packageSources>
          <add key="ArtifactoryNuGetV3" value="http://172.16.2.31:8081/artifactory/api/nuget/v3/nuget" protocolVersion="3" />
          <add key="Artifactory" value="http://172.16.2.31:8081/artifactory/api/nuget/nuget" />
        </packageSources>
        <apikeys>
          <add key="http://172.16.2.31:8081/artifactory/api/nuget/v3/nuget" value= RESTRICTED_API1 />
          <add key="http://172.16.2.31:8081/artifactory/api/nuget/nuget" value= RESTRICTED_API2 />
        </apikeys>
        <packageSourceCredentials>
          <Artifactory>
            <add key="Username" value="admin" />
            <add key="Password" value= RESTRICTED_API3/>
          </Artifactory>
        </packageSourceCredentials>
      </configuration>
      

       

       

      Example package is :  https://www.nuget.org/packages/log4net.Ext.Json/2.0.8.3

       

        Attachments

          Activity

              People

              Assignee:
              Oleksis Oleksii Semenov [EXT] [X] (Inactive)
              Reporter:
              davids David Shin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: