-
Notifications
You must be signed in to change notification settings - Fork 117
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
Gitolite not being updated, no visible errors, while setting up a Docker image #777
Comments
OK, I've started to answer my own question. Looking in /usr/src/redmine/log/, there is a log file git_hosting.log which is not being output to the terminal (the normal way to do logging in docker images). Its telling me +0000 [ERROR] Invalid Gitolite Admin SSH Keys So this might be a stupid config error. If that's what it is I'll close this issue. |
I'm still having issues. Trying to reproduce the steps the server might be taking to ssh I tried running
and it works just fine. I also note that my initial issue report shows the admin interface showing gitolite's ssh response. So SSH must be working, but why am I getting Invalid Giolite Admin SSH Keys? Any idea how I can debug this further? |
OK so I've fixed it. Its another case of #747 which has been closed but is still a live issue so I think that's an error. |
Hi @toastedcrumpets |
That looks great, I'd probably reinforce it with an underline, as its a subtle bug if not as only part of the SSH process fails. I'm still happy enough to close the issue though. Out of interest, what is the method you are using to carry out SSH actions? Its not the CLI ssh tool, as that supports any key format... |
@toastedcrumpets I'm sorry to ask a question again, since you closed this issue. But I'm stucked with the same problem. I tried to follow the new installation instructions but had no success. Do you remember what steps lead to the fix of your issue? Did you change something in the Dockerfile? |
Hey, The file Happy to explain anything else in the file if you need it! Dockerfile
|
Thank you very much for sharing your Dockerfile! I played around a little and get it working with all my desired plugins and themes but the issue remains. I created a key pair on my host machine as you mentioned. At two points I was not sure:
As you may notice I'm a little new to this topic, so thank you for your answer and your patience |
yes mjki2mb2.pub is my public ssh key to set up as admin for gitolite. The known hosts file needs to have the signature of the public key of the ssh server, as otherwise you can have an issue with "unknown host" warnings popping up, but as the whole process is automatic/server side you have no way of accepting the unknown host. You really need to look at /usr/src/redmine/log/git_hosting.log running in the docker to see what errors are coming up when you try to "Rescue" in the redmine setup. If you get really stuck in a few weeks I'll try to set up a script that makes a Dockerfile for this fully automatically. |
Okay thanks,
I followed the key pair generation as you mentioned. Maybe I'm just missing something but I didn't figure out what. |
That's a gitolite error, you've misconfigured your git server. If you're using my docker file, then these are the two lines I use to copy my public ssh key to the image, and install/setup gitolite. Are you using a public key or accidentally sending your private key?
Note this is a different key to the SSH server key which must be generated with PEM. I think #790 should be closed. |
I'm sure that I used the public key for this purpose. I have a question about your setup... maybe I'm just getting something wrong. Do you use your docker container as a closed system? So your ssh-server, your gitolite and your redmine are all in one container, or have you separated some things? Thanks again for your reply. |
My docker container is a completely closed system. I do this as redmine git hosting has some optimisations if it has local access to the repositories (IIRC). I could have done a shared volume between two containers, but this seems overly complex for no real benefit to me, so I did it all in one container. |
Okay, thats what I want to achieve as well. An issue what my be related to the whole problem was that I could not use my created ssh public key for gitolite setup and receive the gitolite banner message. I only can see it if I use the public key created for the ssh server. Do you have an idea what the problem is? |
Hi, |
OK, I've actually got it working. Can you check out that repo, and the Readme.md instructions, see if it works for you? |
Please excuse my late reply. Due to the exam phase in my studies, it took a while to try out your docker-compose example. After a few adjustments, everything works fine. I even managed to enable the hooks (manually). Many thanks for your effort. Since everything works fine now, I closed my issue #790 |
OK great! If your changes were non-trivial, please push an update to that repo. |
Thanks for an amazing project.
I have extended the official Docker redmine image to include setup of redmine_git_hosting. I'm saying this so you know the host is minimal and configured slightly strangely (i.e. I'm running tini to get defunct sshd threads cleaned up). If I get this working I would like to share the docker image as a way of getting redmine_git_hosting running with almost zero-config.
BUT, I have an issue, the gitolite repository is not being updated by redmine. The Config Test page is green, Hooks install just fine, and it can pull an info:
However, starting a new repository, the settings page shows the repo does not exist in gitolite (and checking via terminal, there is no change in the gitolite config since install).
I'm at a loss what to try next. I've tried running Rescue everything ticked. I get no issues in the rails log, or on the interface.
Looking at the temp dir, '/tmp/redmine_git_hosting/git/gitolite-admin.git' exists but it is an empty folder, not a git repository. When performing a Rescue I note that .gitolite/logs/ only has the following in it
2021-01-20.11:24:25 1592 cli gitolite list-phy-repos
2021-01-20.11:24:25 1592 END
2021-01-20.11:24:25 1604 ssh ARGV=id_rsa SOC=info FROM=::1
2021-01-20.11:24:25 1604 system,gitolite,info
2021-01-20.11:24:25 1604 system,/usr/share/gitolite3/commands/info
So it looks like redmine isn't doing anything with gitolite except to request an info to update the setting page on refresh after the POST of the Rescue. I'm guessing the issue is somehow redmine setting up its local admin repo, but the log only shows the POST and the rerender of the settings page.
Any idea how I can carry on debugging this? As this is a docker install, I could set up a test instance for you to look at if needed, although I need to polish my Dockerfile a bit to allow a more generic setup first (like changable host keys).
The text was updated successfully, but these errors were encountered: