Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Blame · forge/config/socket_windows.go

Line attribution on main · 25 line(s)

33cbbc9d
Keenan Nemetz
2d ago
1 //go:build windows
2
3 package config
4
5 import (
6 "os"
7 "path/filepath"
8 )
9
10 // defaultSSHSocket is where the front door's socket lives on Windows. It is
11 // absolute for the same reason as on unix — the forced command runs with sshd's
12 // working directory — and it is under ProgramData because the machine-wide
13 // directory is the one account sshd runs as can reach without guessing what a
14 // user's profile is called.
15 //
16 // `vole serve` creates the directory when it is missing and warns that the sshd
17 // account needs access to it, which on Windows means an access-list entry this
18 // setting does not add for you.
19 func defaultSSHSocket() string {
20 dir := os.Getenv("ProgramData")
21 if dir == "" {
22 dir = `C:\ProgramData`
23 }
24 return filepath.Join(dir, "vole", "ssh.sock")
25 }