Skip to content

The Unified and Autonomous Development Platform

fix: SSH LFS hook generating double .git.git endpoint URL

Robin Shen98d01fdf6a57
diff --git a/server-core/src/main/java/io/onedev/server/git/LfsAuthenticateCommand.java b/server-core/src/main/java/io/onedev/server/git/LfsAuthenticateCommand.java
index 0950435f0f..7d94709014 100644
--- a/server-core/src/main/java/io/onedev/server/git/LfsAuthenticateCommand.java
+++ b/server-core/src/main/java/io/onedev/server/git/LfsAuthenticateCommand.java
@@ -108,7 +108,7 @@ public class LfsAuthenticateCommand implements Command, ServerSessionAware {
throw new ExplicitException("Project not found: " + projectPath);
String url = OneDev.getInstance(UrlService.class).cloneUrlFor(project, false);
Map<Object, Object> response = CollectionUtils.newHashMap(
- "href", url + ".git/info/lfs",
+ "href", url + "/info/lfs",
"header", CollectionUtils.newHashMap(
"Authorization", KubernetesHelper.BEARER + " " + accessToken));
out.write(OneDev.getInstance(ObjectMapper.class).writeValueAsBytes(response));