progressivetech / docker-civicrm-buildkit

A docker image for running civicrm-buildkit
13 stars 9 forks source link

password asked? #7

Closed hopewise closed 6 years ago

hopewise commented 6 years ago

Hello,

I have used a ssh key that does not require a password, however, when I try to ssh into the container, I get this prompt:

www-data@localhost's password: 

So, why I get this prompt?!

jmcclelland commented 6 years ago

Before running the docker build -t civicrm-buildkit ./ command, did you copy your public key to the directory in which you ran the docker build command?

The readme instructs you to run: cp ~/.ssh/id_rsa.pub

That assumes that your functioning private key's corresonding public key is in ~/.ssh/id_rsa.pub (is that the case?).

If not, try copying your public key - be sure to call it id_rsa.pub. Then, rebuild the container so it is included.

hopewise commented 6 years ago

Yes, I did copy the public key to the directory in which I ran the docker build command, but I still get the password prompt.

I also tried to create another key to make sure that it does not require a password, and copied it to the directory of build command, and I've changed the Dockerfile to copy the key I've created, as its with another name, and I still get the password prompt.

Would you like to have a Teamviewer session, if you don't mind, there must be something that I didn't notice?

jmcclelland commented 6 years ago

Sorry! I just don't have the resources to provide ssh public/private key auth support :( and there are just about a million reasons why this can go wrong.

As a work around, you could exec into the container and set a password for the www-data user:

docker exec -it civicrm-buildkit bash
passwd www-data
hopewise commented 6 years ago

Thanks for the work around, but I thought that you were talking about ssh public/private key auth, so, what did you mean? as I like to follow the instructions at read me.

jmcclelland commented 6 years ago

Hi -Yes, the README describes how you can access the container via ssh public/private keys. However, I am not really sure why it is not working for you. I suggested the work-around so you could access the container and get your work done because it is much easier then spending the time debugging why ssh public/private key access is failing for you.

hopewise commented 6 years ago

Sure, thank you.