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

Restart of docker container needed after adding key #4

Open
rglas opened this issue May 12, 2017 · 2 comments
Open

Restart of docker container needed after adding key #4

rglas opened this issue May 12, 2017 · 2 comments
Labels

Comments

@rglas
Copy link

rglas commented May 12, 2017

As a note, I had to restart the docker container after I copied my key. I'm using the latest tag on MacOS.

@jkarlosb
Copy link
Owner

jkarlosb commented May 23, 2017

You have reason, I forgot to mention it. I just update README.md with this information, very useful. Thanks a lot rglas!

@jkarlosb jkarlosb reopened this Nov 30, 2017
@dirkjonker
Copy link

dirkjonker commented Dec 23, 2017

You can prevent restarts by creating a small shell script, e.g.:

#!/bin/sh
cat /git-server/keys/*

Add the file to the container at a location like /usr/local/bin/keys.sh

Add the following options to sshd_config:

AuthorizedKeysCommand /usr/local/bin/keys.sh
AuthorizedKeysCommandUser keyuser

You may want to create a user specifically for this command as is recommended in the sshd_config man page

Some additional scripting and/or configuration may be required to limit the key script to only work for the git user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants