diff --git a/Sources/tart/Credentials/EnvironmentCredentialsProvider.swift b/Sources/tart/Credentials/EnvironmentCredentialsProvider.swift index 5deb949..c91e273 100644 --- a/Sources/tart/Credentials/EnvironmentCredentialsProvider.swift +++ b/Sources/tart/Credentials/EnvironmentCredentialsProvider.swift @@ -2,6 +2,11 @@ import Foundation class EnvironmentCredentialsProvider: CredentialsProvider { func retrieve(host: String) throws -> (String, String)? { + if let tartRegistryHostname = ProcessInfo.processInfo.environment["TART_REGISTRY_HOSTNAME"], + tartRegistryHostname != host { + return nil + } + let username = ProcessInfo.processInfo.environment["TART_REGISTRY_USERNAME"] let password = ProcessInfo.processInfo.environment["TART_REGISTRY_PASSWORD"] if let username = username, let password = password {