You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Overview of the Issue
When using the alpine based image ghcr.io/runatlantis/atlantis:v0.27.1 write git-credentials succeed with the following message:
{"level":"info","ts":"2024-02-15T15:00:49.449Z","caller":"vcs/git_cred_writer.go:29","msg":"wrote git credentials to /home/atlantis/.git-credentials","json":{}}
{"level":"info","ts":"2024-02-15T15:00:49.451Z","caller":"vcs/git_cred_writer.go:71","msg":"successfully ran git config --global credential.helper store","json":{}}
{"level":"info","ts":"2024-02-15T15:00:49.452Z","caller":"vcs/git_cred_writer.go:77","msg":"successfully ran git config --global url.https://x-access-token/@github.com.insteadOf ssh://git@github.com","json":{}}
but when using the debian based image ghcr.io/runatlantis/atlantis:v0.27.1-debian write git-credentials failed with the following message:
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 directory
Reproduction Steps
Switch image tag from v0.27.1 to v0.27.1-debian
Environment details
Atlantis version: v0.27.1-debian
Deployment method: eks/helm
If not running the latest Atlantis version have you tried to reproduce this issue on the latest version:
I'm curious where this landed. seems like there was a PR to ensure the directory exists, but was closed because an alternate resolution was found. I tried searching through the atlantis codebase and cannot find any references to sshd anywhere.
ok, think I've found the issue. the wrong uid is being used during operation. we've been hard-coding the runtime user to 100:1000 because of this issue, and I guess AWS ECS was assigning 100 to the /run/sshd user. as a workaround, we essentially did something more or less equivalent to this PR:
forcefully set the uid of the atlantis user to 1000
chown its home directory to 1000:1000
set the runtime user to 1000:1000
the PR I mentioned would probably do away for the need of this workaround.
Community Note
Overview of the Issue
When using the alpine based image
ghcr.io/runatlantis/atlantis:v0.27.1
write git-credentials succeed with the following message:but when using the debian based image
ghcr.io/runatlantis/atlantis:v0.27.1-debian
write git-credentials failed with the following message:Reproduction Steps
Switch image tag from
v0.27.1
tov0.27.1-debian
Environment details
Atlantis server-side config file:
Repo
atlantis.yaml
file:Note: terragrunt is unused
The text was updated successfully, but these errors were encountered: