Slackbot
02/15/2024, 4:55 PMPePe Amengual
02/15/2024, 5:26 PMEfe Hakan Gençoğlu
02/15/2024, 5:53 PM$HOME == /home/atlantis
Just during debian startup, it's somehow not?Efe Hakan Gençoğlu
02/15/2024, 6:59 PM$HOME
how?? 😄
i'm not even sure how something like this can override $HOME
❯ k logs -f -n atlantis atlantis-0
No files found in /docker-entrypoint.d/, skipping
{"level":"info","ts":"2024-02-15T18:49:57.407Z","caller":"server/server.go:306","msg":"found home dir%!(EXTRA string=path, string=/run/sshd)","json":{}}
{"level":"info","ts":"2024-02-15T18:49:57.408Z","caller":"server/server.go:309","msg":"HOME env var value%!(EXTRA string=HOME, string=/run/sshd)","json":{}}
{"level":"info","ts":"2024-02-15T18:49:57.451Z","caller":"server/server.go:445","msg":"Utilizing BoltDB","json":{}}
Error: initializing server: could not write credentials: Writing ~/.git-credentials file: writing generated .git-credentials file with user, token and hostname to /run/sshd/.git-credentials: open /run/sshd/.git-credentials: no such file or directoryPePe Amengual
02/15/2024, 7:46 PMEfe Hakan Gençoğlu
02/15/2024, 8:09 PM100 , instead of 1000
◦ personal opinion: this feels wrong, since user atlantis also has a home directory and is very obviously not a system user
• the "atlantis" user in the debian image is a normal user, and has uid 1000 as usual
• because the alpine image with the uid 100 is the default for atlantis, the helm chart also has securityContext: runAsUser: 100 as the default
• and if you use the debian image, uid 100 just so happens to be the user "sshd"...:
atlantis@f2045b0018fb:/$ cat /etc/passwd | tail -n 3
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
sshd:x:100:65534::/run/sshd:/usr/sbin/nologin
atlantis:x:1000:1000::/home/atlantis:/bin/bash
• and you end up with $HOME=/run/sshd by chancePePe Amengual
02/15/2024, 8:20 PMPePe Amengual
02/15/2024, 8:21 PMPePe Amengual
02/15/2024, 8:21 PMid atlantis to set the homeJason Reslock
02/15/2024, 9:20 PMSimon Heather
02/16/2024, 4:56 PMPePe Amengual
02/20/2024, 10:52 PMPePe Amengual
02/20/2024, 10:53 PMHans Lambermont
03/15/2024, 12:02 PM