runatlantis / helm-charts

Atlantis Helm Chart
Apache License 2.0
115 stars 186 forks source link

Could not write gitconfig file when githubAppEnabled #288

Closed deejayblee closed 1 year ago

deejayblee commented 1 year ago

My environment is as below

Internal github enterprise org, atlantis works fine.

But some terraform module git clone from public github(github.com), so I want to make it redirection using gitconfig insteadof.

I configured gitconfigSecretName for git redirection with token correctly, It works mostly.

But it shows below error periodically sometims when atlantis plan triggered.

Plan Error

There was an error running git config --global credential.helper store: error: could not write config file /home/atlantis/.gitconfig: Resource busy
: exit status 4

When I try atlantis plan once again, it works again.

Do someone got experienced this behavior? I want to fix this issue sometimes happen periodically. Thank you.

deejayblee commented 1 year ago

I resolved my situation.

I found similar issue https://github.com/runatlantis/helm-charts/issues/222

lifecycle can be used https://github.com/runatlantis/helm-charts/pull/220/files

I added gitconfig as extraVolume and copied the file to /home/atlantis using lifecycle. It works fine to me.

Thank you.