From a0a3783a519d873fec063cd9b29211694375c63a Mon Sep 17 00:00:00 2001 From: "blinkagent[bot]" <237617714+blinkagent[bot]@users.noreply.github.com> Date: Fri, 27 Feb 2026 14:48:55 -0600 Subject: [PATCH] docs(dotfiles): add hint about using SSH URLs when HTTPS cloning is restricted (#757) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some Git providers (e.g. on-prem GitLab) disable HTTPS cloning by default, which causes the dotfiles clone to silently fail during workspace startup. Users see "Startup scripts are still running" but the dotfiles folder is never populated. This PR adds two small documentation touches: 1. **`main.tf` default description** — appends a one-liner suggesting SSH URLs when HTTPS is restricted. This is what users see in the Coder UI parameter prompt. 2. **`README.md`** — new "SSH vs HTTPS URLs" section with an example and a brief explanation of why SSH URLs are more reliable during startup. No logic changes, no new variables — just documentation. --------- Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com> Co-authored-by: DevCats --- registry/coder/modules/dotfiles/README.md | 26 +++++++++++++++++------ registry/coder/modules/dotfiles/main.tf | 2 +- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/registry/coder/modules/dotfiles/README.md b/registry/coder/modules/dotfiles/README.md index c0042e3f..c78b80c3 100644 --- a/registry/coder/modules/dotfiles/README.md +++ b/registry/coder/modules/dotfiles/README.md @@ -18,7 +18,7 @@ Under the hood, this module uses the [coder dotfiles](https://coder.com/docs/v2/ module "dotfiles" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/dotfiles/coder" - version = "1.3.1" + version = "1.3.2" agent_id = coder_agent.example.id } ``` @@ -31,7 +31,7 @@ module "dotfiles" { module "dotfiles" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/dotfiles/coder" - version = "1.3.1" + version = "1.3.2" agent_id = coder_agent.example.id } ``` @@ -42,7 +42,7 @@ module "dotfiles" { module "dotfiles" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/dotfiles/coder" - version = "1.3.1" + version = "1.3.2" agent_id = coder_agent.example.id user = "root" } @@ -54,20 +54,34 @@ module "dotfiles" { module "dotfiles" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/dotfiles/coder" - version = "1.3.1" + version = "1.3.2" agent_id = coder_agent.example.id } module "dotfiles-root" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/dotfiles/coder" - version = "1.3.1" + version = "1.3.2" agent_id = coder_agent.example.id user = "root" dotfiles_uri = module.dotfiles.dotfiles_uri } ``` +## SSH vs HTTPS URLs + +If your Git provider (e.g. GitLab, GitHub Enterprise) restricts HTTPS cloning, use an SSH URL instead: + +```text +# HTTPS (may fail if HTTP cloning is disabled) +https://gitlab.example.com/user/dotfiles.git + +# SSH (uses the workspace's SSH key) +git@gitlab.example.com:user/dotfiles.git +``` + +When a Git provider has HTTPS cloning disabled server-side, the clone will silently fail (the `.git` folder may exist but the working tree will be empty). SSH URLs avoid this because they authenticate with the workspace's SSH key instead of a token-based HTTPS flow. + ## Setting a default dotfiles repository You can set a default dotfiles repository for all users by setting the `default_dotfiles_uri` variable: @@ -76,7 +90,7 @@ You can set a default dotfiles repository for all users by setting the `default_ module "dotfiles" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/dotfiles/coder" - version = "1.3.1" + version = "1.3.2" agent_id = coder_agent.example.id default_dotfiles_uri = "https://github.com/coder/dotfiles" } diff --git a/registry/coder/modules/dotfiles/main.tf b/registry/coder/modules/dotfiles/main.tf index 4f566dea..7b15a391 100644 --- a/registry/coder/modules/dotfiles/main.tf +++ b/registry/coder/modules/dotfiles/main.tf @@ -29,7 +29,7 @@ variable "agent_id" { variable "description" { type = string description = "A custom description for the dotfiles parameter. This is shown in the UI - and allows you to customize the instructions you give to your users." - default = "Enter a URL for a [dotfiles repository](https://dotfiles.github.io) to personalize your workspace" + default = "Enter a URL for a [dotfiles repository](https://dotfiles.github.io) to personalize your workspace. Use an SSH URL (e.g. `git@host:user/repo`) if your Git provider restricts HTTPS cloning." } variable "default_dotfiles_uri" {