Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Install nuget package from private feed



  • Hi,

    I need to install nuget from private feed, which needs login details to install through nuget command line tool.

    Used Nuget version: 3.5.0.1938

    1. When I use feed url(http://myserver/feeds/restricted) to authenticate and then install, I get an error as

    "An error occurred while retrieving package metadata for 'mypackage.1.0.0' from source 'restricted'. The V2 feed at 'http://myserver/log-in/FindPackagesById()?id='mypackage'' returned an unexpected status code '404 Not Found'.

    1. When I use feed url(http://myserver/nuget/restricted) to authenticate and then intall,I get an error as

    "An error occurred while retrieving package metadata for 'mypackage.1.0.0' from source 'http://myserver/nuget/restricted'. The V2 feed at 'http://myserver/nuget/restricted/Packages(Id='mypackage',Version='1.0.0')' returned an unexpected status code '401 Unauthorized'."

    When I use method '1' authentication is fine, but it could not find the package.
    In method '2' it can find the package but cannot authenticate.

    Is there any work around to get this working?
    Or Is this bug from Nuget.exe that it's not possible to install the package from private feed that needs login details?

    Thank You,
    Bhavani

    Product: ProGet
    Version: 4.7.6



  • These are two separate errors:

    • 404 - the package you asked for was not found
    • 401 - you are not authorized to ask for a package

    If you configure your feed for authentication, then you're going to need to authenticate to the feed before you can query. The query will not even be considered if you do not authenticate.

    However, even if you authenticate correctly, if the package is not there, you will receive a 404. They are unrelated messages.


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation