+4
-4
appview/db/timeline.go
+4
-4
appview/db/timeline.go
+9
-4
appview/state/git_http.go
+9
-4
appview/state/git_http.go
···
14
knot := r.Context().Value("knot").(string)
15
repo := chi.URLParam(r, "repo")
16
17
-
uri := "https"
18
if s.config.Dev {
19
-
uri = "http"
20
}
21
-
targetURL := fmt.Sprintf("%s://%s/%s/%s/info/refs?%s", uri, knot, user.DID, repo, r.URL.RawQuery)
22
resp, err := http.Get(targetURL)
23
if err != nil {
24
http.Error(w, err.Error(), http.StatusInternalServerError)
···
50
}
51
knot := r.Context().Value("knot").(string)
52
repo := chi.URLParam(r, "repo")
53
-
targetURL := fmt.Sprintf("https://%s/%s/%s/git-upload-pack?%s", knot, user.DID, repo, r.URL.RawQuery)
54
client := &http.Client{}
55
56
// Create new request
···
14
knot := r.Context().Value("knot").(string)
15
repo := chi.URLParam(r, "repo")
16
17
+
scheme := "https"
18
if s.config.Dev {
19
+
scheme = "http"
20
}
21
+
targetURL := fmt.Sprintf("%s://%s/%s/%s/info/refs?%s", scheme, knot, user.DID, repo, r.URL.RawQuery)
22
resp, err := http.Get(targetURL)
23
if err != nil {
24
http.Error(w, err.Error(), http.StatusInternalServerError)
···
50
}
51
knot := r.Context().Value("knot").(string)
52
repo := chi.URLParam(r, "repo")
53
+
54
+
scheme := "https"
55
+
if s.config.Dev {
56
+
scheme = "http"
57
+
}
58
+
targetURL := fmt.Sprintf("%s://%s/%s/%s/git-upload-pack?%s", scheme, knot, user.DID, repo, r.URL.RawQuery)
59
client := &http.Client{}
60
61
// Create new request
+5
-3
flake.nix
+5
-3
flake.nix
···
44
inherit (gitignore.lib) gitignoreSource;
45
in {
46
overlays.default = final: prev: let
47
-
goModHash = "sha256-ywhhGrv8KNqy9tCMCnA1PU/RQ/+0Xyitej1L48TcFvI=";
48
buildCmdPackage = name:
49
final.buildGoModule {
50
pname = name;
···
282
config = mkIf config.services.tangled-knotserver.enable {
283
nixpkgs.overlays = [self.overlays.default];
284
285
-
environment.systemPackages = with pkgs; [git];
286
287
users.users.git = {
288
isSystemUser = true;
···
300
enable = true;
301
extraConfig = ''
302
Match User git
303
-
AuthorizedKeysCommand ${pkgs.keyfetch}/bin/keyfetch -repoguard-path ${pkgs.repoguard}/bin/repoguard
304
AuthorizedKeysCommandUser nobody
305
'';
306
};
···
44
inherit (gitignore.lib) gitignoreSource;
45
in {
46
overlays.default = final: prev: let
47
+
goModHash = "sha256-tBhwRT3qnTHoAyasYIDwr9+3V+c7VLPY2LJ6A25l1gA=";
48
buildCmdPackage = name:
49
final.buildGoModule {
50
pname = name;
···
282
config = mkIf config.services.tangled-knotserver.enable {
283
nixpkgs.overlays = [self.overlays.default];
284
285
+
environment.systemPackages = with pkgs; [
286
+
git
287
+
];
288
289
users.users.git = {
290
isSystemUser = true;
···
302
enable = true;
303
extraConfig = ''
304
Match User git
305
+
AuthorizedKeysCommand ${pkgs.keyfetch}/bin/keyfetch -repoguard-path ${pkgs.repoguard}/bin/repoguard -log-path /home/git/repoguard.log
306
AuthorizedKeysCommandUser nobody
307
'';
308
};