-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Can't download Cargo packages from private owner #24177
Comments
@NOBLES5E This is a known limitation of Cargo. There is a RFC to support authenticated downloads: https://rust-lang.github.io/rfcs/3139-cargo-alternative-registry-auth.html , rust-lang/cargo#10474 If you install the current nightly, change to content of your
Adding |
The linked RFC has been implemented and stabilized and unfortunately does not include the alternative. Are there plans to regenerate Working on any collaborative projects requires that everyone involved routinely patches Would be great if proper support for this is added. I would also like to note that the only sane-ish alternative to the above hack is to always use the git index and just edit This might be a solution for you if the index isn't updated very often so the "resolving deltas" phase of the git checkout wouldn't take too long. But if you want to continue using the sparse protocol, then the response returned by |
Ah, my apologies for not noticing this earlier. It turns out that was only added in 1.21, and that PR wasn't referenced in any changelogs (in fact, no mention of such a bug fix was made at all) Having to reinitialize manually after changing the visibility seems like a needless extra step given that the sparse index does it dynamically, but at least I'm now aware that an upgrade will solve my specific problem, because I have no use for the Git index protocol. I don't want to speak for OP but I think that problem, too, is solved by this.
It isn't. Cargo retries the request with authentication if the server returns 401. The fact that I'm able to reproduce this on Forgejo Next is either user error or a downstream issue (which, I believe, you have been notified of). I would think, therefore, that this issue may be closed, unless OP can somehow still reproduce it. |
@KN4CK3R The Cargo package registry packages seem not to be downloadable when the organization holding the package is private. The
token
field doesn't help here. Is this expected behavior?Originally posted by @NOBLES5E in #21888 (comment)
The text was updated successfully, but these errors were encountered: