File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -213,7 +213,11 @@ async function getCredentialFromDockerConfigOrCredentialHelper(params: CommonPar
213213 let configContainsAuth = false ;
214214 try {
215215 // https://docs.docker.com/engine/reference/commandline/cli/#change-the-docker-directory
216- const dockerConfigRootDir = process . env . DOCKER_CONFIG || path . join ( os . homedir ( ) , '.docker' ) ;
216+ const customDockerConfigPath = process . env . DOCKER_CONFIG ;
217+ if ( customDockerConfigPath ) {
218+ output . write ( `[httpOci] Environment DOCKER_CONFIG is set to '${ customDockerConfigPath } '` , LogLevel . Trace ) ;
219+ }
220+ const dockerConfigRootDir = customDockerConfigPath || path . join ( os . homedir ( ) , '.docker' ) ;
217221 const dockerConfigFilePath = path . join ( dockerConfigRootDir , 'config.json' ) ;
218222 if ( await isLocalFile ( dockerConfigFilePath ) ) {
219223 const dockerConfig : DockerConfigFile = jsonc . parse ( ( await readLocalFile ( dockerConfigFilePath ) ) . toString ( ) ) ;
@@ -277,12 +281,14 @@ async function getCredentialFromDockerConfigOrCredentialHelper(params: CommonPar
277281 output . write ( `[httpOci] Invoking platform default credential helper '${ defaultCredHelper } '` , LogLevel . Trace ) ;
278282 const auth = await getCredentialFromHelper ( params , registry , defaultCredHelper ) ;
279283 if ( auth ) {
284+ output . write ( '[httpOci] Found auth from platform default credential helper' , LogLevel . Trace ) ;
280285 return auth ;
281286 }
282287 }
283288 }
284289
285290 // No auth found from docker config or credential helper.
291+ output . write ( `[httpOci] No authentication credentials found for registry '${ registry } ' via docker config or credential helper.` , LogLevel . Trace ) ;
286292 return ;
287293}
288294
You can’t perform that action at this time.
0 commit comments