kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.49k stars 4.89k forks source link

Minikube start failed due to an error in copying the SSH key (GUEST_PROVISION_CP_PUBKEY). #19309

Open AbsoluteZero000 opened 3 months ago

AbsoluteZero000 commented 3 months ago

What Happened?

When attempting to start Minikube, the process fails with the following error message:

❌  Exiting due to GUEST_PROVISION_CP_PUBKEY: Failed to start host: creating host: create: creating: prepare kic ssh: copying pub key: docker copy /tmp/tmpf-memory-asset992297741 into minikube:/home/docker/.ssh/authorized_keys, output: Error response from daemon: Could not find the file /home/docker/.ssh in container minikube

In the attached logs, Minikube repeatedly attempts to establish an SSH handshake but fails due to a missing authentication method. This is evidenced by the following log entry:

I0721 08:08:02.164606   28933 retry.go:31] will retry after 440.264154ms: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

The root cause appears to be an error in copying the public key (id_rsa) to the /home/docker/.ssh/authorized_keys file within the Minikube container, resulting in the absence of a valid SSH authentication method but I'm not sure.

Attach the log file

log.txt

Operating System

Ubuntu

Driver

Docker

clausmichele commented 2 months ago

I'm currently facing the same issue on Ubuntu 20.04.

afbjorklund commented 2 months ago

The directory /home/docker/.ssh is supposed to be a part of the kicbase image.

drwxr-xr-x 2 docker docker 4096 Apr 18 17:24 /home/docker/.ssh