docker-osx-dev icon indicating copy to clipboard operation
docker-osx-dev copied to clipboard

Not finding the rsa_id with docker-machine

Open gah-boh opened this issue 9 years ago • 8 comments

I'm having an issue where it's not finding the rsa_id and looking for it on the top level folder of the DOCKER_MACHINE_STORE_PATH instead of in DOCKER_MACHINE_STORE_PATH/machines/<machine name>/

A fix for this was pointed out on issue 133. I have a fork where it's working, if you'd like a pull request, but it's basically exactly what @dekz wrote in the issue.

gah-boh avatar Nov 12 '15 18:11 gah-boh

Was this not fixed by @lukaso's #136? Have you tried updating?

brikis98 avatar Nov 12 '15 22:11 brikis98

I did make sure I had the most recent version (even though I started using this yesterday). My fork with the change is also up to date.

I'm going to set this up on my coworkers machine tomorrow so I'll be able to check if it's just me. I'll keep you posted.

gah-boh avatar Nov 12 '15 23:11 gah-boh

I have no idea how our installations are different, but it is good to get confirmation that I am not the only one.

~ ❯❯❯ docker-machine inspect --format="{{.HostOptions.AuthOptions.StorePath}}" dev
/Users/jacob/.docker/machine
~ ❯❯❯ docker-machine inspect --format="{{.StorePath}}" dev
<no value>

Neither of these values will result in $DOCKER_MACHINE_STORE_PATH/machines/dev/id_rsa which is where our keys exist.

dekz avatar Nov 13 '15 00:11 dekz

I had the same behaviour when I downgraded to 0.4.1 docker-machine from a machine I'd previously upgraded to 0.5.0. I ended up rebuilding my vm. On 13 Nov 2015 00:05, "Jacob Evans" [email protected] wrote:

I have no idea how our installations are different, but it is good to get confirmation that I am not the only one.

~ ❯❯❯ docker-machine inspect --format="{{.HostOptions.AuthOptions.StorePath}}" dev /Users/jacob/.docker/machine ~ ❯❯❯ docker-machine inspect --format="{{.StorePath}}" dev

Neither of these values will result in $DOCKER_MACHINE_STORE_PATH/machines/dev/id_rsa

— Reply to this email directly or view it on GitHub https://github.com/brikis98/docker-osx-dev/issues/140#issuecomment-156276107 .

lukaso avatar Nov 13 '15 19:11 lukaso

I'm using docker-machine 0.5.0. I haven't upgraded or downgraded it.

gah-boh avatar Nov 13 '15 20:11 gah-boh

I just tried this on my co workers machine. It works on his, the main difference is he's using docker-machine 3.0.

gah-boh avatar Nov 13 '15 21:11 gah-boh

Yeah it is obvious this is happening to others (see #142).

I'll look at making a PR to support both places for the key.

dekz avatar Nov 13 '15 21:11 dekz

As far as I can see the implementation used by docker-machine ssh dev resolves the ssh client key to:

filepath.Join(d.StorePath, "machines", d.MachineName, file)

Where file is "id_rsa" as can be seen here.

Can anyone who has /machines/id_rsa confirm they still have /machines/dev/id_rsa.

Using StorePath directly is also not intended

dekz avatar Nov 14 '15 11:11 dekz