Skip to content

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Jul 9, 2022

Backport #20289

The code is as old as back to 2016, creating the directory automatically is not correct IMO.

In other places for ssh key writing (RewriteAllPrincipalKeys / appendAuthorizedKeysToFile, etc), the directory will still be created when updating the keys.

This PR will resolve the confusing and annoying problem: the dummy and empty ".ssh" directory in new git home


Update: wait for #20299

@wxiaoguang wxiaoguang added this to the 1.17.0 milestone Jul 9, 2022
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Jul 9, 2022
@wxiaoguang wxiaoguang added the status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR label Jul 9, 2022
@wxiaoguang wxiaoguang marked this pull request as draft July 9, 2022 14:57
@lunny lunny marked this pull request as ready for review July 10, 2022 09:05
@6543 6543 removed the status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR label Jul 10, 2022
@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 Jul 10, 2022
@6543 6543 merged commit 317c565 into go-gitea:release/v1.17 Jul 10, 2022
@wxiaoguang wxiaoguang deleted the backport-prevent-empty-ssh branch July 10, 2022 12:51
wxiaoguang added a commit that referenced this pull request Jul 11, 2022
…file (#20299) (#20306)

Backport #20299. Follow #20298. Only the `GlobalInitInstalled` function should prepare the SSH files for external server or starts the builtin server.
* `trustedUserCaKeys` is removed, use `SSH.TrustedUserCAKeys` directly
* introduce `ssh.Init`, move the SSH init code from `routers/init.go` to it
* `ssh.Init` will start builtin SSH server or prepare external SSH server files
@6543 6543 added the type/bug label Jul 12, 2022
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants