Skip to content
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: Add gauth #1

Merged
merged 13 commits into from
Oct 14, 2024
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ rattler_cache = { version = "0.2.6", default-features = false }
rattler_conda_types = { version = "0.28.2", default-features = false }
rattler_digest = { version = "1.0.1", default-features = false }
rattler_lock = { version = "0.22.27", default-features = false }
rattler_networking = { version = "0.21.4", default-features = false }
rattler_networking = { version = "0.21.4", default-features = false, features = [
"google-cloud-auth",
] }
rattler_repodata_gateway = { version = "0.21.17", default-features = false }
rattler_shell = { version = "0.22.4", default-features = false }
rattler_solve = { version = "1.1.0", default-features = false }
Expand Down
5 changes: 4 additions & 1 deletion crates/pixi_utils/src/reqwest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ use rattler_networking::{
authentication_storage::{self, backends::file::FileStorageError},
mirror_middleware::Mirror,
retry_policies::ExponentialBackoff,
AuthenticationMiddleware, AuthenticationStorage, MirrorMiddleware, OciMiddleware,
AuthenticationMiddleware, AuthenticationStorage, GCSMiddleware, MirrorMiddleware,
OciMiddleware,
};

use reqwest::Client;
Expand Down Expand Up @@ -106,6 +107,8 @@ pub fn build_reqwest_clients(config: Option<&Config>) -> (Client, ClientWithMidd
.with(oci_middleware());
}

client_builder = client_builder.with(GCSMiddleware);

client_builder = client_builder.with_arc(Arc::new(
auth_middleware(&config).expect("could not create auth middleware"),
));
Expand Down
Loading