-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
"Permission denied (publickey)" when running in docker #5623
Labels
Comments
Did you pass the USER environment variable to the container? If yes, then it is likely because of this line: gitea/docker/usr/bin/entrypoint Line 7 in 801843b
AllowUsers git on a line, instead of search for that string where it could be the middle.
|
MoshiBin
added a commit
to MoshiBin/gitea
that referenced
this issue
Jan 2, 2019
Thanks for the quick response! Posted a pull request 😄 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
[x]
):Description
After setting up gitea on Docker using a user called "gitea", creating a user and adding its public key, cloning fails with the
Permission denied (publickey)
error.I looked into this and found something strange - in
/etc/ssh/sshd_config
, theAllowedUsers
directive showedgiteaea
instead ofgitea
. In fact, every time I restarted the container, the user gained another "ea" at the end - so it went togiteaeaea
etc. Changing the directive back togitea
manually doesn't help, because during startup it changes togiteaea
.My workaround: I copied
/etc/ssh/sshd_config
from the container to the host, and bound it into the container, setting the:ro
flag so it would be immutable.The text was updated successfully, but these errors were encountered: