TemplatesModules
Back to Modules
Git Config Icon

Git Config

By:
Stores Git configuration from Coder credentials
README
Variables (4)
Parameters (2)
Source

Runs a script that updates git credentials in the workspace to match the user's Coder credentials, optionally allowing to the developer to override the defaults.

1module "git-config" {
2  source   = "registry.coder.com/modules/git-config/coder"
3  version  = "1.0.15"
4  agent_id = coder_agent.example.id
5}

TODO: Add screenshot

Examples

Allow users to override both username and email

1module "git-config" {
2  source             = "registry.coder.com/modules/git-config/coder"
3  version            = "1.0.15"
4  agent_id           = coder_agent.example.id
5  allow_email_change = true
6}

TODO: Add screenshot

Disallowing users from overriding both username and email

1module "git-config" {
2  source                = "registry.coder.com/modules/git-config/coder"
3  version               = "1.0.15"
4  agent_id              = coder_agent.example.id
5  allow_username_change = false
6  allow_email_change    = false
7}