diff --git a/server/git/ssh.go b/server/git/ssh.go index d8aa7c37ba9273289f5443b792133eaaf14a70b4..6aa5f83de3f5e9ae00efc76588d7586a24d9cb58 100644 --- a/server/git/ssh.go +++ b/server/git/ssh.go @@ -76,7 +76,7 @@ func Middleware(repoDir string, gh Hooks) wish.Middleware { return func(s ssh.Session) { func() { cmd := s.Command() - if len(cmd) == 2 { + if len(cmd) == 2 && strings.HasPrefix(cmd[0], "git") { gc := cmd[0] // repo should be in the form of "repo.git" repo := strings.TrimPrefix(cmd[1], "/")