From 22328eeb83b450c4c8226c67d7e45e955ca2f637 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Fri, 5 Jul 2024 12:24:13 -0600 Subject: [PATCH] fix(registry): remove login on self hosted --- server/api/services/registry.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/api/services/registry.ts b/server/api/services/registry.ts index 29c421b5..da124c7a 100644 --- a/server/api/services/registry.ts +++ b/server/api/services/registry.ts @@ -33,8 +33,10 @@ export const createRegistry = async (input: typeof apiCreateRegistry._type) => { }); } - const loginCommand = `echo ${input.password} | docker login ${input.registryUrl} --username ${input.username} --password-stdin`; - await execAsync(loginCommand); + if (newRegistry.registryType === "cloud") { + const loginCommand = `echo ${input.password} | docker login ${input.registryUrl} --username ${input.username} --password-stdin`; + await execAsync(loginCommand); + } return newRegistry; });