alpha
Login
or
Join now
dunkirk.sh
/
core
forked from
tangled.org/core
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
keyfetch: flag for log path
author
Anirudh Oppiliappan
committer
Akshay
date
1 year ago
(Mar 5, 2025, 9:29 PM UTC)
commit
b4e772b4
b4e772b4c9422295440cc73276d26a60b660cd6a
parent
f621867a
f621867a91e999e3b840d5efbee644be3b0ef0fa
+5
-4
2 changed files
Expand all
Collapse all
Unified
Split
cmd
keyfetch
format.go
main.go
+3
-3
cmd/keyfetch/format.go
Reviewed
···
4
4
"fmt"
5
5
)
6
6
7
7
-
func formatKeyData(repoguardPath string, gitDir string, data []map[string]interface{}) string {
7
7
+
func formatKeyData(repoguardPath, gitDir, logPath string, data []map[string]interface{}) string {
8
8
var result string
9
9
for _, entry := range data {
10
10
result += fmt.Sprintf(
11
11
-
`command="%s -base-dir %s -user %s -log-path /home/git/log ",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty %s`+"\n",
12
12
-
repoguardPath, gitDir, entry["did"], entry["key"])
11
11
+
`command="%s -base-dir %s -user %s -log-path %s",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty %s`+"\n",
12
12
+
repoguardPath, gitDir, entry["did"], logPath, entry["key"])
13
13
}
14
14
return result
15
15
}
+2
-1
cmd/keyfetch/main.go
Reviewed
···
22
22
endpoint := flag.String("internal-api", "http://localhost:5444", "Internal API endpoint")
23
23
repoguardPath := flag.String("repoguard-path", "/home/git/repoguard", "Path to the repoguard binary")
24
24
gitDir := flag.String("git-dir", "/home/git", "Path to the git directory")
25
25
+
logPath := flag.String("log-path", "/home/git/log", "Path to log file")
25
26
flag.Parse()
26
27
27
28
resp, err := http.Get(*endpoint + "/keys")
···
41
42
log.Fatalf("error unmarshalling response body: %v", err)
42
43
}
43
44
44
44
-
fmt.Print(formatKeyData(*repoguardPath, *gitDir, data))
45
45
+
fmt.Print(formatKeyData(*repoguardPath, *gitDir, *logPath, data))
45
46
}