Git commit still uses the email from my Coder account

Previous context: https://discord.com/channels/747933592273027093/971231372373033030/1302557051834339368 Hello! I have removed the env values concerning Git in my template:
# These environment variables allow you to make Git commits right away after creating a
# workspace. Note that they take precedence over configuration defined in ~/.gitconfig!
# You can remove this block if you'd prefer to configure Git manually or using
# dotfiles. (see docs/dotfiles.md)
env = {
GIT_AUTHOR_NAME = coalesce(data.coder_workspace_owner.me.full_name, data.coder_workspace_owner.me.name)
GIT_AUTHOR_EMAIL = "${data.coder_workspace_owner.me.email}"
GIT_COMMITTER_NAME = coalesce(data.coder_workspace_owner.me.full_name, data.coder_workspace_owner.me.name)
GIT_COMMITTER_EMAIL = "${data.coder_workspace_owner.me.email}"
}
# These environment variables allow you to make Git commits right away after creating a
# workspace. Note that they take precedence over configuration defined in ~/.gitconfig!
# You can remove this block if you'd prefer to configure Git manually or using
# dotfiles. (see docs/dotfiles.md)
env = {
GIT_AUTHOR_NAME = coalesce(data.coder_workspace_owner.me.full_name, data.coder_workspace_owner.me.name)
GIT_AUTHOR_EMAIL = "${data.coder_workspace_owner.me.email}"
GIT_COMMITTER_NAME = coalesce(data.coder_workspace_owner.me.full_name, data.coder_workspace_owner.me.name)
GIT_COMMITTER_EMAIL = "${data.coder_workspace_owner.me.email}"
}
but Git still uses the email from my Coder account. Are there anything else I need to remove? Thanks This is my template: https://github.com/katorlys-samples/coderv2-templates/blob/main/default/main.tf#L58
8 Replies
Codercord
Codercord2d ago
<#1307525869555679292>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Katorly
KatorlyOP2d ago
I have defined the committer email in .gitconfig, but Git seems to ignore it, because there are GIT_AUTHOR_EMAIL and GIT_COMITTER_EMAIL environment variables present.
No description
Katorly
KatorlyOP2d ago
No description
Atif
Atif2d ago
GitHub
coderv2-templates/default/main.tf at 4fcdef5ad7f9f451705a52dc4c0bbb...
Coder CDE v2 workspace terraform templates. Contribute to katorlys-samples/coderv2-templates development by creating an account on GitHub.
Atif
Atif2d ago
It's setting these env variables
Katorly
KatorlyOP2d ago
Thanks! Problem resolved!
Phorcys
Phorcys2d ago
closing the issue since you got it resolved
Codercord
Codercord2d ago
@Phorcys closed the thread.
Want results from more Discord servers?
Add your server