-
Notifications
You must be signed in to change notification settings - Fork 274
Checksum download sometimes fails (status: 400) #171
Comments
url lookup and Ideally, we would use url lookup, but currently, I have no fix. |
@paulfantom that's not it. I tried I think All these mechanisms ( The code seems to use a Still not sure why the configuration for Github is appended to a request to Anyhow, I also found netrc in the internals of the CI server we are using: I am gonna roll back all changes and confirm this today and then close this ticket. Not sure if you want a note in the readme since it's been a repeated problem. Or add a link to this comment to all the tickets that people previously opened and went stale? =) |
Thanks for the thorough investigation! Great job! Looks to me that GitHub stores all assets in S3 bucket hence redirections to It seems to me that this is indeed netrc issue. I wonder if we can forcibly omit it in lookup? Either way, I think describing this in the documentation would be the best approach here. Let's maybe start a |
Yes, that's a good plan. Where do you want me to PR the file? |
I haven't looked but what breaks the redirect is that the code adds the headers from the first request to the second which happens when it follows the location. Even though the netrc is for "github.com" and not for Amazon's server. GitHub support said in another ticket to not add the headers. I am "assuming" curl doesn't? To be confirmed (by someone else 🤪). I haven't checked yet if that's how it's supposed to be or if that's something one can turn off. Seems kinda wild that there's no message that the config is loaded. Maybe I PR that to Ansible. |
In root of this repo.
Yes, but the module follows redirects (which is necessary here) and at the end requests lands in s3.
It doesn't unless specified with
I believe executing |
So, check this though (without netrc). This is just to figure out if this is a bug in Ansible or some library underneath. I am forcing basic-auth with cURL, it uses it against Github, but doesn't use it against the redirect — which is why it works. Look at the output, it contains I can't find the RFC, but I think headers etc. are only meant to be used for the first request, not for the redirect. But that's less important here. I'll PR a file about netrc.
|
I made this, to make it a bit more transparent: |
Replacing
lookup()
withuri
:Yields the
400
— but not sure whereAuthorization
header is introduced?Originally posted by @till in #165 (comment)
The text was updated successfully, but these errors were encountered: