-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Dependabot is failing to authenticate against a private Hex Repisotiry #11031
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
Comments
I'm seeing the same. Tracing the HTTP calls done to the private repository, I can see that the I see there's a unit test for this scenario (https://github.com/dependabot/dependabot-core/blob/main/hex/spec/dependabot/hex/update_checker_spec.rb#L387-L398) and that test seems to do the right thing. Can we debug how the value of |
@sorentwo can you provide some guidance on how to tackle this? Does dependabot still work with the Oban repo? |
Is there a sample repo you could make? If it's just Oban I can try to figure it out. |
@frerich Try |
@TylerWitt To reproduce this issue, you can clone https://github.com/frerich/dependabot_testbed -- it's just the result of The Modifying the test So right now I'm speculating that it's something funny about how the YAML file is turned into a |
@frerich I can confirm the YAML is being read correctly--but the Will keep digging. |
It is possible that this issue is happening before |
When I pass in the contents of my
into the dev container, and run the dry run on (my version) of your repository, it works. So indeed, something about how execution is running for Elixir. |
@abdulapopoola Is it possible for me to debug this further? Or is it more likely something internal? |
Thanks @TylerWitt , yes this will require some internal work, I've added this to our tracking board and hope to get back to you soon. |
@TylerWitt Much appreciated for tracing this further! I had hoped that this would be something within dependabot-core since then I could hack it into submission. Apparently, that's not the case though. I wonder how this would ever work for anyone, e.g. users of libraries like Oban Pro which are hosted on a private Hex repository and require an auth key. I suppose this worked at some point after @sorentwo implemented this. |
@frerich Yes, this certainly worked when I implemented it. The hex repo API hasn't changed since then, so I'm not sure what's changed. |
@sorentwo @abdulapopoola I can confirm that our previously working setup for using Oban Pro's private hex repo w/ Dependabot spontaneously stopped working on its own sometime in the past ~2 months, with no changes to our Dependabot config, secrets, or anything. I even tried using the new Oban Pro repo hoping it would resolve the issues but no luck there. It seems pretty clear that something regressed in Dependabot on this front. I'm able to manually hit the package endpoints locally with a curl like this: curl -v https://repo.oban.pro:443/packages/oban_pro -H "Authorization: MY_TOKEN" But Dependabot is seeing a 401 when trying to fetch it, even though I have my secret set up correctly (and always have):
Clearly it's not setting the auth header correctly based on my config, which matches what Oban says to do in its docs. |
@abdulapopoola Is anybody looking at this and is there any timeline of when it will be fixed? This is definitely a regression from the Dependabot side, it's simply not passing the Authentication header at all, I can see in my registry's logs that it's always empty. If this isn't going to be fixed soon - can we at least update the Dependabot docs to say that it's currently broken? The issue has been open and happening for months, the docs should be updated. This is also not only breaking just private Hex Registries, but because of the failure, I'm seeing that Dependabot is now marking all dependency updates as failed due to authentication failures (including dependencies that are part of the public Hex Registry). This makes Dependabot completely unusable for Elixir projects that use any private packages. From Dependabot logs:
None of these are from the private registry that we are using, but they are all failing because of the |
I can confirm that this is affecting us in the same way. |
@abdulapopoola Is anybody looking at this? This is a major issue and regression in Dependabot and there's been no answers or activity from maintainers in many months... Can we get any answers on what's going on here? |
Hello everyone, So sorry about this - we got overwhelmed. The main challenge has been finding someone to investigate this since we are spread thin. Currently exploring some options and should update the thread tomorrow. |
👋 Hi everyone; longtime Elixir developer (and hubber) here. This issue was brought to my attention at AlchemyConf today, and @abdulapopoola has been kind enough to accept my offer to help out from our end. Thanks for all the context above. I may have more questions as I investigate the source of the regression and work on a fix. Please bear with me as I'm traveling back from the conference and need to work with the team to get acquainted with the internals; it's possible they may fix it first, too! |
I found an issue in the Dependabot Proxy which was making it inject credentials too conservatively. So I think this PR should have fixed it for Dependabot on Actions: github/dependabot-action#1448 Could someone verify that it's working now? Thanks to @frerich putting up the open source example, made it easy to track down! |
Thanks @jakecoffman |
Thanks again @jakecoffman for the fix! Closing this out. |
@abdulapopoola @bruce any chance you could point me at the specific underlying code changes that fixed this issue? I really want to get the GOPROXY issue (#7362) solved and might be able to help with that if I could see how this all works / where a change is needed. Thanks 🙏 |
@bgentry , this was an internal tooling fix. |
Is there an existing issue for this?
Package ecosystem
Hex
Package manager version
No response
Language version
Elixir
Manifest location and content before the Dependabot update
/directory/mix.exs
dependabot.yml content
Updated dependency
No response
What you expected to see, versus what you actually saw
The package manager is failing to update due to
private_source_authentication_failure
Native package manager behavior
No response
Images of the diff or a link to the PR, issue, or logs
No response
Smallest manifest that reproduces the issue
No response
The text was updated successfully, but these errors were encountered: