mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-09-02 08:16:57 +00:00
better unauth message
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# Triggers on version tags and builds cross-platform binaries using GoReleaser
|
||||
|
||||
when:
|
||||
- event: ["push"]
|
||||
- event: ["manual"]
|
||||
# TODO: Trigger only on version tags (v1.0.0, v2.1.3, etc.)
|
||||
branch: ["main"]
|
||||
|
||||
@@ -29,5 +29,3 @@ steps:
|
||||
|
||||
- name: Run GoReleaser
|
||||
command: goreleaser release --clean
|
||||
environment:
|
||||
REPO_URL
|
||||
@@ -69,8 +69,8 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
baseURL = "http://" + baseURL
|
||||
}
|
||||
}
|
||||
w.Header().Set("WWW-Authenticate", fmt.Sprintf(`Basic realm="ATCR Registry - Visit %s/install to authenticate or use 'docker login' with your ATProto app-password"`, baseURL))
|
||||
http.Error(w, "authentication required", http.StatusUnauthorized)
|
||||
w.Header().Set("WWW-Authenticate", `Basic realm="ATCR Registry"`)
|
||||
http.Error(w, fmt.Sprintf("authentication required - visit %s/install to authenticate or use 'docker login' with your ATProto app-password", baseURL), http.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -114,8 +114,8 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
baseURL = "http://" + baseURL
|
||||
}
|
||||
}
|
||||
w.Header().Set("WWW-Authenticate", fmt.Sprintf(`Basic realm="ATCR Registry - Visit %s/install to authenticate or use 'docker login' with your ATProto app-password"`, baseURL))
|
||||
http.Error(w, "authentication failed", http.StatusUnauthorized)
|
||||
w.Header().Set("WWW-Authenticate", `Basic realm="ATCR Registry"`)
|
||||
http.Error(w, fmt.Sprintf("authentication failed - visit %s/install to authenticate or use 'docker login' with your ATProto app-password", baseURL), http.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -142,8 +142,8 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
baseURL = "http://" + baseURL
|
||||
}
|
||||
}
|
||||
w.Header().Set("WWW-Authenticate", fmt.Sprintf(`Basic realm="ATCR Registry - Visit %s/install to authenticate or use 'docker login' with your ATProto app-password"`, baseURL))
|
||||
http.Error(w, fmt.Sprintf("authentication failed: %v", err), http.StatusUnauthorized)
|
||||
w.Header().Set("WWW-Authenticate", `Basic realm="ATCR Registry"`)
|
||||
http.Error(w, fmt.Sprintf("authentication failed - visit %s/install to authenticate or use 'docker login' with your ATProto app-password", baseURL), http.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user