summaryrefslogtreecommitdiff
path: root/src/other_tools/just_mr/fetch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/other_tools/just_mr/fetch.cpp')
-rw-r--r--src/other_tools/just_mr/fetch.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/other_tools/just_mr/fetch.cpp b/src/other_tools/just_mr/fetch.cpp
index 11ae3a01..07a03f3d 100644
--- a/src/other_tools/just_mr/fetch.cpp
+++ b/src/other_tools/just_mr/fetch.cpp
@@ -398,14 +398,13 @@ auto MultiRepoFetch(std::shared_ptr<Configuration> const& config,
common_args.remote_serve_address);
// setup authentication
- JustMR::Utils::SetupAuthConfig(auth_args);
- std::optional<Auth::TLS> auth = {};
- if (Auth::Instance().GetAuthMethod() == AuthMethod::kTLS) {
- auth = Auth::TLS::Instance();
+ auto auth_config = JustMR::Utils::CreateAuthConfig(auth_args);
+ if (not auth_config) {
+ return kExitConfigError;
}
ApiBundle const apis{/*repo_config=*/nullptr,
- auth ? &*auth : nullptr,
+ &*auth_config,
RemoteExecutionConfig::RemoteAddress()};
bool const has_remote_api =