We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e574519 commit dac0763Copy full SHA for dac0763
env_common/src/logic/api_oci_registry.rs
@@ -123,6 +123,17 @@ impl OCIRegistryProvider {
123
}
124
125
fn get_client_auth(&self) -> (Client, RegistryAuth) {
126
+ let protocol = if std::env::var("OCI_REGISTRY_ALLOW_HTTP").is_ok() {
127
+ oci_client::client::ClientProtocol::Http
128
+ } else {
129
+ oci_client::client::ClientProtocol::Https
130
+ };
131
+
132
+ let config = oci_client::client::ClientConfig {
133
+ protocol,
134
+ ..Default::default()
135
136
+ let client = Client::new(config);
137
let auth = match &self.username {
138
None => RegistryAuth::Anonymous,
139
Some(username) => {
@@ -132,6 +143,6 @@ impl OCIRegistryProvider {
143
RegistryAuth::Basic(username.clone(), self.password.clone().unwrap())
144
145
};
- (Client::default(), auth)
146
+ (client, auth)
147
148
0 commit comments