Fixed: unnecessary regeneration of SSH keys in developer mode when they already existed. (#12059)

This commit is contained in:
Dattu 2026-01-30 12:12:41 +05:30 committed by GitHub
parent bb8e7d39e6
commit bac3421da4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -614,7 +614,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
}
// FIXME: take a global database lock here for safety.
boolean onWindows = isOnWindows();
if(!onWindows) {
if (!onWindows && !(privkeyfile.exists() && pubkeyfile.exists())) {
Script.runSimpleBashScript("if [ -f " + privkeyfile + " ]; then rm -f " + privkeyfile + "; fi; ssh-keygen -t ecdsa -m PEM -N '' -f " + privkeyfile + " -q 2>/dev/null || ssh-keygen -t ecdsa -N '' -f " + privkeyfile + " -q");
}