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!

How can I download files without being logged in?



  • What I'm attempting to do is to download a nuget package via the API because I want to integrate it with a JIRA plugin I'm writing. If I log into the page, on the left there's a button for "download" and if I click that in the browser, I get the package. I've tried various things and I can't seem to get it to download via connection to the API because it wants the user to be authenticated.

    The latest thing I've tried is: http://proget-server/api/v2/package/{feedName}/{packageName}/{optional-version}?API_Key= (plus the appropriate API key, no sense in leaking that) - That url basically is coming from: https://inedo.com/support/tutorials/proget/get-the-complete-list-of-connected-feeds-using-the-proget-json-api

    When I copy the URL out of my debug and throw it in my authenticated browser, it redirects and downloads. When I do it in incognito, it wants me to authenticate. When I do it programmatically I get a bunch of redirects that eventually it quits following.

    What is the best way to configure this to allow for API driven downloads of the files without having to configure nuget on the target environment (since I'm not trying to install anything, just pull the file down)

    Product: ProGet
    Version: 4.6.2



  • You will need to give the "Anonymous" user at least read-only access to download the package from the feed. You can configure this from Admin > Tasks.



  • Apparently I was an idiot and couldn't do basic auth correctly, because once I did that correctly it worked fine without anonymous access involved. I am using Java 8, and the Authenticator class to set the authentication on my URL globally.

    Hope this helps the next person coming along.



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation