-
Notifications
You must be signed in to change notification settings - Fork 187
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
feat: use RATTLER_AUTH_FILE
and use proper reqwest clients in search
#994
Conversation
I am wondering if we should make this something supported in rattler itself. In that case, we could also make it so that
would write to the But we can also do that in a follow up PR. |
I think my last commit fixes authentication for global install. We should also take a look to make sure that the default channels are used (by default) for the |
ideally also for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two questions
src/utils/reqwest.rs
Outdated
@@ -12,6 +15,21 @@ pub fn default_retry_policy() -> ExponentialBackoff { | |||
ExponentialBackoff::builder().build_with_max_retries(3) | |||
} | |||
|
|||
fn auth_middleware() -> AuthenticationMiddleware { | |||
if let Ok(auth_file) = std::env::var("RATTLER_AUTH_FILE") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this file location also be part of the global config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made it so! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you document it aswell
Except for my documentation and better error request it does work! If that is added we can merge. |
I think this change is not fully functionnal. I am setting the environment variable but it does not work from what I can see. |
@william-alhant can you check on main again? We just merged another PR that re-shuffled a few things again and should make things work smoother. |
I just checked again on main (93f838b). The issue is still there. |
@william-alhant if you have the time, maybe you could give #1019 a try |
great! |
@pavelzw do you think you could try this branch?
I tested a bit and I could not see what would go wrong with your config file though.