fix(t3code): gitea SSH im Service HOME-unabhaengig machen #29

Merged
m3tam3re merged 1 commits from fix/t3code-ssh-hardening into master 2026-10-31 16:46:02 +01:00
Collaborator

Gitea-Clone klappt interaktiv (m3tam3re-Terminal), aber nicht aus dem t3code-Service-Kontext. Statt zu raten, welche Stelle in t3s Spawn-Chain das HOME verliert, wird jeder Link irrelevant:

  • t3SshConfig: IdentityFile absolut statt ~
  • Service-Env: HOME explizit + GIT_SSH_COMMAND auf den absoluten Store-Pfad der ssh-config

Verifiziert per nix eval: HOME=/home/m3tam3re und GIT_SSH_COMMAND=ssh -F /nix/store/...-t3-gitea-ssh-config landen in der Unit.

Nach dem Deploy: systemctl restart t3code, dann den Clone-Thread in T3 erneut anstossen. Falls es DANACH immer noch scheitert: sudo journalctl -u t3code -n 60 ansehen (Fehlerform zeigt die Ursache: publickey = Account/Key, no such file = Pfad, command not found = PATH).

Gitea-Clone klappt interaktiv (m3tam3re-Terminal), aber nicht aus dem t3code-Service-Kontext. Statt zu raten, welche Stelle in t3s Spawn-Chain das HOME verliert, wird jeder Link irrelevant: - t3SshConfig: IdentityFile absolut statt ~ - Service-Env: HOME explizit + GIT_SSH_COMMAND auf den absoluten Store-Pfad der ssh-config Verifiziert per nix eval: HOME=/home/m3tam3re und GIT_SSH_COMMAND=ssh -F /nix/store/...-t3-gitea-ssh-config landen in der Unit. Nach dem Deploy: systemctl restart t3code, dann den Clone-Thread in T3 erneut anstossen. Falls es DANACH immer noch scheitert: sudo journalctl -u t3code -n 60 ansehen (Fehlerform zeigt die Ursache: publickey = Account/Key, no such file = Pfad, command not found = PATH).
m3ta-chiron added 1 commit 2026-10-31 16:44:22 +01:00
The T3 threads could clone from gitea interactively (m3tam3re terminal)
but not from the t3code service context. Instead of guessing which link
in the spawn chain drops HOME, make every link irrelevant:

- t3SshConfig: absolute IdentityFile (no ~ resolution needed)
- service env: HOME set explicitly + GIT_SSH_COMMAND pointing at the
  absolute store-path ssh config — git uses exactly this config for
  gitea remotes regardless of HOME or user ssh-config lookup

Verified via nix eval: HOME=/home/m3tam3re and
GIT_SSH_COMMAND=ssh -F /nix/store/...-t3-gitea-ssh-config land in the
unit. After deploy: systemctl restart t3code, then retrigger the clone
thread.
m3tam3re merged commit cf1c4b9f31 into master 2026-10-31 16:46:02 +01:00
m3tam3re deleted branch fix/t3code-ssh-hardening 2026-10-31 16:46:02 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: m3tam3re/nixos-config#29