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

Only offer hostcertificates if they exist #15849

Merged
merged 4 commits into from May 13, 2021

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented May 12, 2021

A common bug report is the otherwise harmless sshd logging:

Could not load host certificate "/data/ssh/ssh_host_ed25519_cert": No such file or directory

This PR simply checks if these files exist before creation of sshd_config and if
they do not exist, doesn't add a reference to them.

Close #14110
Close #13724

Signed-off-by: Andrew Thornton art27@cantab.net

A common bug report is the otherwise harmless sshd logging:

```
Could not load host certificate "/data/ssh/ssh_host_ed25519_cert": No such file or directory
```

This PR simply checks if these files exist before creation of sshd_config and if
they do not exist, doesn't add a reference to them.

Fix go-gitea#14110 amongst others.

Signed-off-by: Andrew Thornton <art27@cantab.net>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 12, 2021
Co-authored-by: silverwind <me@silverwind.io>
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 13, 2021
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 13, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #15849 (95b4a2e) into main (52f8dcd) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #15849   +/-   ##
=======================================
  Coverage   44.01%   44.01%           
=======================================
  Files         681      681           
  Lines       82243    82243           
=======================================
  Hits        36196    36196           
- Misses      40139    40140    +1     
+ Partials     5908     5907    -1     
Impacted Files Coverage Δ
modules/git/command.go 87.50% <0.00%> (-1.93%) ⬇️
models/repo_list.go 77.04% <0.00%> (-0.78%) ⬇️
services/pull/pull.go 43.83% <0.00%> (+0.45%) ⬆️
modules/process/manager.go 75.30% <0.00%> (+2.46%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52f8dcd...95b4a2e. Read the comment docs.

@lafriks lafriks merged commit 0ada74e into go-gitea:main May 13, 2021
@lafriks
Copy link
Member

lafriks commented May 13, 2021

please send backport

@zeripath zeripath deleted the fix-14110-if-no-certs-no-certs branch May 13, 2021 12:13
zeripath added a commit to zeripath/gitea that referenced this pull request May 13, 2021
Backport go-gitea#15849

A common bug report is the otherwise harmless sshd logging:

```
Could not load host certificate "/data/ssh/ssh_host_ed25519_cert": No such file or directory
```

This PR simply checks if these files exist before creation of sshd_config and if
they do not exist, doesn't add a reference to them.

Fix go-gitea#14110 amongst others.

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
@zeripath zeripath added the backport/done All backports for this PR have been created label May 13, 2021
techknowlogick pushed a commit that referenced this pull request May 13, 2021
Backport #15849

A common bug report is the otherwise harmless sshd logging:

```
Could not load host certificate "/data/ssh/ssh_host_ed25519_cert": No such file or directory
```

This PR simply checks if these files exist before creation of sshd_config and if
they do not exist, doesn't add a reference to them.

Fix #14110 amongst others.

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lauris BH <lauris@nix.lv>

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
@richmahn
Copy link
Contributor

Funny, I was just dealing with this in our own fork, but commented it out, and then saw this conflicted with my changes. Thanks for putting those if-thens in there @zeripath !

AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 10, 2021
A common bug report is the otherwise harmless sshd logging:

```
Could not load host certificate "/data/ssh/ssh_host_ed25519_cert": No such file or directory
```

This PR simply checks if these files exist before creation of sshd_config and if
they do not exist, doesn't add a reference to them.

Fix go-gitea#14110 amongst others.

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
@delvh delvh added topic/distribution This PR changes something about the packaging of Gitea and removed theme/docker labels Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/deployment topic/distribution This PR changes something about the packaging of Gitea
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recurrent errors in logs ssh logs about missing host certificates
7 participants