New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Artifact download URL only work for registered users (404 for guests) #51
Comments
This broke our workflow for us as well, used to use this feature to test automated builds in virtual machines where we don't want to login. |
This comment has been minimized.
This comment has been minimized.
@oprypin i've had success with Edit: that works with a personal token with no permissions, for any public repo. |
@MCOfficer I am not able to reproduce your success there. I get the exact same results as with my example (and this doesn't seem to apply to the browser-based URL either). |
@oprypin try this:
you should get a |
OK so it works but the token must have |
It's worthwhile noting other continuous-integration platforms such as AppVeyor allow guests to download artifacts. Quassel IRC, an open source IRC client, made use of this to allow for non-developers in the community to test new builds and new features, and since moving to GitHub Actions guests can no longer download artifacts. If GitHub does not want to universally allow guests to download artifacts, an option on a per-repository or per-organization level would sufficiently address this issue. Note: I am a community contributor to Quassel IRC. I am not speaking officially on behalf of the Quassel project. |
Add note to README.md explaining that one must log into GitHub to download artifacts, i.e. the automated Windows and macOS builds. This does not impact full releases. This commit can be reverted once the GitHub issue is addressed. See actions/upload-artifact#51
Add note to README.md explaining that one must log into GitHub to download artifacts, i.e. the automated Windows and macOS builds. This does not impact full releases. This commit can be reverted once the GitHub issue is addressed. See actions/upload-artifact#51
(edited for emphasis, re @oprypin:) still, two years since this issue's opening, results in the error: "You must have the actions scope to download artifacts." Having this link be publicly accessible would be the simplest way to distribute nightly builds to my team. Having read through this and all the related open issues, github has never commented on or officially documented this feature disparity with other CI/CD solutions. I would transition to a different solution, but am on a deadline. |
You're saying "As of January 2022" like it's something new. But it's always been that way. Check for alternatives above in the thread. |
Have updated my original comment; my point is it seems a lot of people feel it shouldn't be this way. nightly.link is a wonderful service but it's still ultimately a middleman adding complexity. |
Any idea when this gets implemented? |
bump? |
Unauthorized users can't download builds from GHA Artifacts (see actions/upload-artifact#51), so use https://nightly.link to redirect them to the actual URL.
Unauthorized users can't download builds from GHA Artifacts (see actions/upload-artifact#51), so use https://nightly.link to redirect them to the actual URL.
Bump? It's been 2 3/4 years since this issue was opened, and I still don't understand what GitHub expects us to do for nightly builds. https://nightly.link/ works great (thanks @oprypin), but it's an additional service I have to configure, and adds another middleman. Can someone at GitHub at least give us a statement, and what we are supposed to do? |
It's effort on the project's part, but one workaround is to publish artifacts to a nightly tag and update it with every CI run. See for example Endless Sky, AppImageKit |
See, the problem I have (for my project) is that I don't just have one nightly build- I want to have builds of every commit. |
The admin ui assets are built via a github workflow and published as github a artifact. The artifact can be downloaded, avoiding the need to build the assets again locally, and eliminating the need for front-end build tools like yarn and npm. This updates the `build-ui` target to use a new script that will attempt to download the pre-built assets. Note that this script requires that the `gh` cli is installed since an authenticated request is necessary to download the workflow artifacts. If the artifact cannot be downloaded either due to the lack of `gh` or because the artifact cannot be found, it will fallback to using `git clone` (and will require yarn to build the assets). See: https://cli.github.com/ https://docs.github.com/en/rest/actions/artifacts actions/upload-artifact#51
The admin ui assets are built via a github workflow and published as github a artifact. The artifact can be downloaded, avoiding the need to build the assets again locally, and eliminating the need for front-end build tools like yarn and npm. This updates the `build-ui` target to use a new script that will attempt to download the pre-built assets. Note that this script requires that the `gh` cli is installed since an authenticated request is necessary to download the workflow artifacts. If the artifact cannot be downloaded either due to the lack of `gh` or because the artifact cannot be found, it will fallback to using `git clone` (and will require yarn to build the assets). See: https://cli.github.com/ https://docs.github.com/en/rest/actions/artifacts actions/upload-artifact#51
Any progress regarding this? nightly.link is an absolute hack and we shouldn't need to use it so that users can get the latest software. |
This is still a problem in 2023. |
Here's an alternative that works:
Example here: https://github.com/kernelkit/infix/blob/main/.github/workflows/build.yml For every build your |
We used to copy the URL from https://github.com/actions/upload-artifact#where-does-the-upload-go to our website for nightly builds (which have short retention and frequent updates, and don't warrant a GitHub Releases push).
We intended to replace this with programmable download URLs that have been discussed in many issues on the repositories (either a
latest/release.zip
or a third party service which asks the Actions API for the latest URL and redirects the user).This stopped working very recently.
Until recently, the actions tab was only viewable for logged in users (confusing 404 HTTP error for guests), but the artifact download URLs were still public (working for logged in users and also guests).
Likewise, when the Actions API was released, API requests worked without any authentication. One could simply query the API for an artifact download URL and redirect the guests to it. - All of that worked without GitHub account and could have worked from JavaScript or a small lightweight webservice which redirects the end-user to the latest artifact download through HTTP redirects (I wrote https://github.com/JayFoxRox/GitHub-artifact-URL for this purpose).
However, within the last days these artifact download URLs were suddenly made private - they only work for registered GitHub users now. Everyone clicking the download button on our website (who isn't logged into GitHub) gets a confusing 404 error for direct artifact download URLs now.
Even my tool to redirect users doesn't work anymore because the Actions API also requires the API client to be authenticated now (also getting a confusing "not found" error otherwise). See JayFoxRox/GitHub-artifact-URL#4 ; even if I implemented authentication now, the download URL (we redirect to) would likely not work for guest users (such as end-users of our software, who don't have a GitHub account).
It really starts to feel like we are working against how GitHub Actions is intended to work (now, and in the future - none of which seems to be documented very well). It is clearly different from any other CI I have ever worked with; because Travis and AppVeyor had public artifact URLs with simple URLs, which could be easily linked from our website (Compare AppVeyor).
The GitHub documentation for artifacts says
The first part is obvious; but the second part is really vague. Who shall access this stored data? Why? - My thinking has been (from experience with other CI systems): to share temporary builds, with users for early-testing ("continuous integration"), without pushing a release.
The text was updated successfully, but these errors were encountered: