diff --git a/server/config/file.go b/server/config/file.go index a4e39eb7cfb063b7b7db7974ff692701a9d72e63..7caa446f0719a8e1cc9685417dffb750d75c8e3a 100644 --- a/server/config/file.go +++ b/server/config/file.go @@ -31,11 +31,11 @@ ssh: public_url: "{{ .SSH.PublicURL }}" # The path to the SSH server's private key. - key_path: "{{ .SSH.KeyPath }}" + key_path: {{ .SSH.KeyPath }} # The path to the server's client private key. This key will be used to # authenticate the server to make git requests to ssh remotes. - client_key_path: "{{ .SSH.ClientKeyPath }}" + client_key_path: {{ .SSH.ClientKeyPath }} # The maximum number of seconds a connection can take. # A value of 0 means no timeout. @@ -66,10 +66,10 @@ http: listen_addr: "{{ .HTTP.ListenAddr }}" # The path to the TLS private key. - tls_key_path: "{{ .HTTP.TLSKeyPath }}" + tls_key_path: {{ .HTTP.TLSKeyPath }} # The path to the TLS certificate. - tls_cert_path: "{{ .HTTP.TLSCertPath }}" + tls_cert_path: {{ .HTTP.TLSCertPath }} # The public URL of the HTTP server. # This is the address that will be used to clone repositories. diff --git a/server/hooks/gen.go b/server/hooks/gen.go index 67101d513e246d5e220631b9519fbf6e0761b3cd..ac23515dac630743d5cdc414e9306b7563be9310 100644 --- a/server/hooks/gen.go +++ b/server/hooks/gen.go @@ -46,6 +46,9 @@ func GenerateHooks(_ context.Context, cfg *config.Config, repo string) error { return err } + // Convert to forward slashes for Windows. + ex = filepath.ToSlash(ex) + for _, hook := range []string{ PreReceiveHook, UpdateHook,