Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix problems when using SSH keys with a non-root users. #1033

Merged
merged 1 commit into from May 27, 2019

Conversation

Projects
None yet
2 participants
@fago
Copy link
Contributor

commented Apr 5, 2019

I'm using the CLI image with a SSH key set via environment variable. However this is currently not possible as non root.

I got it working with a line like

RUN /lagoon/entrypoints/05-ssh-key.sh && chown -R 1000:1000 /home/.ssh
in the dockerfile, but since the key file is made readonly this errors out on repeated runs. 600 should be just as safe (owner can change it anyway) and makes starting the container work.

TL/DR to repeat the problem:

  • Add the line above the add the key
  • Start the container as non-root user with the environment variable being still set

Result:

  • Error due to /home/.ssh/key being not writable anymore.

The PR fixes the problem.

@Schnitzel Schnitzel added this to the v0.23.0 milestone May 27, 2019

@Schnitzel Schnitzel merged commit 1106933 into amazeeio:master May 27, 2019

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.