From ba0024645d5dc01c27bccdf8fc7b4a21d7dc79ee Mon Sep 17 00:00:00 2001 From: Paulo Castro Date: Mon, 25 May 2020 16:52:58 +0100 Subject: [PATCH] balena deploy: Fix "access denied" pushing images to registry Change-type: patch --- lib/utils/compose_ts.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/utils/compose_ts.ts b/lib/utils/compose_ts.ts index 8344e54c..687c29b7 100644 --- a/lib/utils/compose_ts.ts +++ b/lib/utils/compose_ts.ts @@ -588,9 +588,7 @@ async function getTokenForPreviousRepos( const { authorizePush, getPreviousRepos } = await import('./compose'); const sdk = getBalenaSdk(); const previousRepos = await getPreviousRepos(sdk, docker, logger, appId); - if (!previousRepos || previousRepos.length === 0) { - return ''; - } + const token = await authorizePush( sdk, apiEndpoint,