Invalid or unknown remote ssh hostkey (Rugged?)

Open
#822 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
docker, git, ruby
Domain
backend, devops

Research direction

Start with data/vendor/libgit2/src/libgit2/transports/ssh.c at line 743 and compare Rugged 1.5.1 with 1.5.0.1 in the Docker container. Check how the startup scripts invoke bundle install and review git_hosting.log while reproducing the Rescue-tab action. Done means the Rugged/Docker interaction is confirmed or ruled out and the affected version or configuration is recorded.

Written by the indexing model from the issue text.

Description

A week ago I have updated Redmine to the latest v5.0.4 and redmine_git_hosting v6.0.1. All setup is running on on modified official Docker image. Previously there was Redmine v4.2.x that was made same way and git was working just perfectly.

Today I have my colleague reported that when he tries to checkout repository git asks for password and I know that public keys are not working. Went to Admin->Plugins->Redmine Git Hosting Plugin -> Rescue TAB checked all check boxes and hit save. That was to fast from the last time I have ever used this function. Later checked log file git_hosting.log which showed errors:

2023-02-21 22:16:30 +0200 [ERROR] Invalid Gitolite Admin SSH Keys
2023-02-21 22:16:30 +0200 [ERROR] invalid or unknown remote ssh hostkey

... next several hours was trying different methods: checked permissions, recreated all certificates several times, enabled debug mode on Redmine and also on SSHD process nothing helped. And it was unclear from where this error is coming from. I tried to search for that error using Google and I think I found that it is related to gem named rugged and in the latest version v1.5.1 this error message was added in the code. Rugged 1.5.0.1 -> 1.5.1 file data/vendor/libgit2/src/libgit2/transports/ssh.c line: 743

When I check gem list inside Docker container I see that there is rugged (1.5.1) I tried manually to remove this version and install 1.5.0.1 but if I restart Docker container it automatically installs all gems using bundle install as there are scripts on startup. I will change them later and try to eliminate them.

Has may be anybody sported such problem? That rugged version was released January 21, 2023. So if this is related then all new installations will get in to this problem.

Dominant language
Ruby
Stars
275
Forks
118
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from redmine-git-hosting/redmine_git_hosting

All issues in redmine-git-hosting/redmine_git_hosting

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.