loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Do not create empty ".ssh" directory when loading config (#20289)

Creating the directory automatically is not correct.
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.

authored by

wxiaoguang and committed by
GitHub
36353e27 49f9d43a

+1 -3
+1 -3
modules/setting/setting.go
··· 859 859 SSH.AuthorizedPrincipalsAllow, SSH.AuthorizedPrincipalsEnabled = parseAuthorizedPrincipalsAllow(sec.Key("SSH_AUTHORIZED_PRINCIPALS_ALLOW").Strings(",")) 860 860 861 861 if !SSH.Disabled && !SSH.StartBuiltinServer { 862 - if err := os.MkdirAll(SSH.RootPath, 0o700); err != nil { 863 - log.Fatal("Failed to create '%s': %v", SSH.RootPath, err) 864 - } else if err = os.MkdirAll(SSH.KeyTestPath, 0o644); err != nil { 862 + if err = os.MkdirAll(SSH.KeyTestPath, 0o644); err != nil { 865 863 log.Fatal("Failed to create '%s': %v", SSH.KeyTestPath, err) 866 864 } 867 865