You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
modules/git-config
Muhammad Atif Ali ff989e9e6b
wip tests
2 years ago
..
README.md test cases are wip 2 years ago
main.test.ts wip tests 2 years ago
main.tf add flags to control if developers can update 2 years ago
run.sh started test, standardized git not installed message 2 years ago

README.md

display_name description icon maintainer_github verified tags
Git Config Stores Git configuration from Coder credentials ../.icons/git.svg coder true
helper
git

git-config

Runs a script that checks for stored Git credentials user.name and user.email, populating them with workspace owner's credentials when missing.

Examples

Using workspace owner

The default credentials can be populated from the workspace owner's information.

module "git-config" {
  source = "https://registry.coder.com/modules/git-config"
  agent_id = coder_agent.example.id
  default_username = data.coder_workspace.me.owner
  default_user_email = data.coder_workspace.me.owner_email
}

Custom credentials

Credentials can also be set manually by the template admin.

module "git-config" {
  source = "https://registry.coder.com/modules/git-config"
  agent_id = coder_agent.example.id
  default_username = "michael"
  user_email = "michael@example.com"
}

Coder parameter usage

With the defaults set, users still have the opportunity to override the template admin's settings with the coder parameter interface. The workspace owner can manually add their credentials during workspace creation or leave them as "default".

Coder Parameter Example