Friday, June 2, 2023

Docker - err: exec: "docker-credential-desktop": executable file not found in $PATH, out: ``

Introduction:

Docker has revolutionized the way we package, distribute, and deploy applications. However, like any other technology, it is not immune to errors and issues. One such error that I encountered recently while working with Docker on my Mac was the "error getting credentials - executable file not found" error. In this blog post, I will share my experience with this error and provide a solution that worked for me.

The Error:

When attempting to build a Docker image or perform a Docker login, I encountered the following error message:


openjdk:17: error getting credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH, out: ``


Error saving credentials: error storing credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH, out: `` 


Diagnosis:

The error message suggests that the Docker daemon was unable to locate the "docker-credential-desktop" executable file in the $PATH environment variable. This executable is responsible for retrieving Docker credentials and authentication.