Old ~/.config/credentials deleted on the operator's go (R-1134 closed); R-1130 accepted; R-1138 for its two backup copies (176 rows)
gates / gates (push) Successful in 7m0s
gates / gates (push) Successful in 7m0s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012qRErfCoiTkvDK9N5XHbzb
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
# Names and MATCH / MISSING / DIFFERENT for each old backup copy of the credentials file. Never a value.
|
||||
import glob, os, re, sys
|
||||
sys.path.insert(0, "/mnt/5_hdd/felhom.eu/git/cc-secrets")
|
||||
from ccsec import store
|
||||
vals = store.load_all()
|
||||
for f in sorted(glob.glob(os.path.expanduser("~/.config/credentials.bak-*"))):
|
||||
st = os.stat(f); out = []; total = 0
|
||||
for n, line in enumerate(open(f, encoding="utf-8").read().split("\n"), 1):
|
||||
s = line.strip()
|
||||
if not s or s.startswith("#"):
|
||||
continue
|
||||
m = re.match(r"^(export\s+)?([A-Za-z_][A-Za-z0-9_-]*)=(.*)$", s)
|
||||
if not m:
|
||||
out.append("line %d: not KEY=VALUE (%d chars)" % (n, len(s))); continue
|
||||
total += 1
|
||||
name = m.group(2).replace("-", "_")
|
||||
try:
|
||||
v = store.unwrap(m.group(3), "line %d" % n)
|
||||
except store.StoreError:
|
||||
out.append("%s: cannot unwrap" % name); continue
|
||||
if vals.get(name) != v:
|
||||
out.append("%s: %s" % (name, "MISSING from store" if name not in vals else "DIFFERENT from store (an older value?)"))
|
||||
print("=== %s: %d bytes, mode %o, %d keys; not matching the store: %s" % (os.path.basename(f), st.st_size, st.st_mode & 0o777, total, "none" if not out else ""))
|
||||
for o in out:
|
||||
print(" " + o)
|
||||
@@ -0,0 +1,24 @@
|
||||
# Before deleting ~/.config/credentials (operator's go, 2026-10-17): every key in it must be in the store with an equal
|
||||
# value. Compares in memory; prints names and MATCH / MISSING / DIFFERENT only, never a value.
|
||||
import os, re, sys
|
||||
sys.path.insert(0, "/mnt/5_hdd/felhom.eu/git/cc-secrets")
|
||||
from ccsec import store
|
||||
vals = store.load_all()
|
||||
bad = 0
|
||||
lines = open(os.path.expanduser("~/.config/credentials"), encoding="utf-8").read().split("\n")
|
||||
for n, line in enumerate(lines, 1):
|
||||
s = line.strip()
|
||||
if not s or s.startswith("#"):
|
||||
continue
|
||||
m = re.match(r"^(export\s+)?([A-Za-z_][A-Za-z0-9_-]*)=(.*)$", s)
|
||||
if not m:
|
||||
print("line %d: NOT a KEY=VALUE line (%d chars)" % (n, len(s))); bad += 1; continue
|
||||
name = m.group(2).replace("-", "_")
|
||||
try:
|
||||
v = store.unwrap(m.group(3), "line %d" % n)
|
||||
except store.StoreError as e:
|
||||
print("line %d %s: cannot unwrap (%s)" % (n, name, e)); bad += 1; continue
|
||||
state = "MATCH" if vals.get(name) == v else ("MISSING" if name not in vals else "DIFFERENT")
|
||||
bad += state != "MATCH"
|
||||
print("%-24s %s" % (name, state))
|
||||
print("lines %d, problems %d" % (len(lines), bad))
|
||||
@@ -0,0 +1,4 @@
|
||||
=== credentials.bak-20261001-calibre: 1081 bytes, mode 600, 17 keys; not matching the store:
|
||||
HUB_TOKEN: DIFFERENT from store (an older value?)
|
||||
=== credentials.bak-20261016-tester1: 1196 bytes, mode 600, 19 keys; not matching the store:
|
||||
TESTER1_PASSWORD: DIFFERENT from store (an older value?)
|
||||
@@ -0,0 +1,24 @@
|
||||
HETZNER_API MATCH
|
||||
PASSWORD MATCH
|
||||
TS_KEY MATCH
|
||||
HUB_TOKEN MATCH
|
||||
ISO_S3_CLIENT_AK MATCH
|
||||
ISO_S3_CLIENT_SK MATCH
|
||||
ISO_S3_URL MATCH
|
||||
R_DEMO_FELHOM MATCH
|
||||
R_DEMO_HP MATCH
|
||||
R_C11_REWALK MATCH
|
||||
R_PART4 MATCH
|
||||
DOCKER_USERNAME MATCH
|
||||
DOCKER_PASSWORD MATCH
|
||||
DEMO_HP_BOOKSTACK_USER MATCH
|
||||
DEMO_HP_BOOKSTACK_PW MATCH
|
||||
DEMO_HP_CALIBRE_USER MATCH
|
||||
DEMO_HP_CALIBRE_PW MATCH
|
||||
TESTER1_PASSWORD MATCH
|
||||
TESTER4_PASSWORD MATCH
|
||||
UMAMI_CC_USER MATCH
|
||||
UMAMI_CC_PW MATCH
|
||||
DEV_BASIC_AUTH_USER MATCH
|
||||
DEV_BASIC_AUTH_PW MATCH
|
||||
lines 24, problems 0
|
||||
Reference in New Issue
Block a user