sameersbn / sameersbn/docker-gitlab
gitlab not adding keys to /home/git/.ssh/authorized_keys
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 8.1k
- Forks
- 2.1k
- Avg merge
- 17h 47m
- Merged PRs (30d)
- 7
Description
I do not know if this is a problem with gitlab or docker-gitlab but I have just noticed that, after a restart, docker-gitlab will only add a key once to authorized_keys after adding a key to a profile. After the first added key, no further changes are made to authorized keys if you add another key.
I believe that I have replicated this on a new and existing docker-gitlab build. I do not see anything in the logs but I will look further.
To replicate follow (tail -f) the authorized_keys file in /home/git/.ssh/ (or wherever you have that folder on your host... if you have not added a key since restart... add one to someone's profile.. note that you see it being added to authorized_keys. Now add another... note that it does not get added.
a rebuild does work... if you exec into the image and do teh following:
cd /home/git/gitlab
sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production
all new keys appear... very strange.
Chris
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior while watching /home/git/.ssh/authorized_keys, then inspect the GitLab key-update path and the documented bundle exec rake cache:clear RAILS_ENV=production entry point. Compare key additions before and after a restart; done means each newly added profile key appears in authorized_keys without manually clearing the cache.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, gitlab, rails
- Domain
- authentication, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100