chore: Append .git to clone url for facilitate cloudflare rule config

This commit is contained in:
Robin Shen 2025-11-22 11:34:08 +08:00
parent b6970fb247
commit 1875200269
2 changed files with 3 additions and 3 deletions

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "server-ee"]
path = server-ee
url = https://code.onedev.io/onedev/server-ee
url = https://code.onedev.io/onedev/server-ee.git

View File

@ -53,9 +53,9 @@ public class DefaultUrlService implements UrlService {
@Override
public String cloneUrlFor(Project project, boolean ssh) {
if (ssh)
return settingService.getSystemSetting().getEffectiveSshRootUrl() + "/" + project.getPath();
return settingService.getSystemSetting().getEffectiveSshRootUrl() + "/" + project.getPath() + ".git";
else
return settingService.getSystemSetting().getServerUrl() + "/" + project.getPath();
return settingService.getSystemSetting().getServerUrl() + "/" + project.getPath() + ".git";
}
@Override