Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    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?

    Scheduled Pinned Locked Moved Support
    apijavajiraproget
    3 Posts 1 Posters 21 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          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.

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post
          Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation