Skip to content

Commit a0a3783

Browse files
blinkagent[bot]blink-so[bot]DevelopmentCats
authored
docs(dotfiles): add hint about using SSH URLs when HTTPS cloning is restricted (#757)
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 <christofer@coder.com>
1 parent eb38bc3 commit a0a3783

2 files changed

Lines changed: 21 additions & 7 deletions

File tree

registry/coder/modules/dotfiles/README.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Under the hood, this module uses the [coder dotfiles](https://coder.com/docs/v2/
1818
module "dotfiles" {
1919
count = data.coder_workspace.me.start_count
2020
source = "registry.coder.com/coder/dotfiles/coder"
21-
version = "1.3.1"
21+
version = "1.3.2"
2222
agent_id = coder_agent.example.id
2323
}
2424
```
@@ -31,7 +31,7 @@ module "dotfiles" {
3131
module "dotfiles" {
3232
count = data.coder_workspace.me.start_count
3333
source = "registry.coder.com/coder/dotfiles/coder"
34-
version = "1.3.1"
34+
version = "1.3.2"
3535
agent_id = coder_agent.example.id
3636
}
3737
```
@@ -42,7 +42,7 @@ module "dotfiles" {
4242
module "dotfiles" {
4343
count = data.coder_workspace.me.start_count
4444
source = "registry.coder.com/coder/dotfiles/coder"
45-
version = "1.3.1"
45+
version = "1.3.2"
4646
agent_id = coder_agent.example.id
4747
user = "root"
4848
}
@@ -54,20 +54,34 @@ module "dotfiles" {
5454
module "dotfiles" {
5555
count = data.coder_workspace.me.start_count
5656
source = "registry.coder.com/coder/dotfiles/coder"
57-
version = "1.3.1"
57+
version = "1.3.2"
5858
agent_id = coder_agent.example.id
5959
}
6060
6161
module "dotfiles-root" {
6262
count = data.coder_workspace.me.start_count
6363
source = "registry.coder.com/coder/dotfiles/coder"
64-
version = "1.3.1"
64+
version = "1.3.2"
6565
agent_id = coder_agent.example.id
6666
user = "root"
6767
dotfiles_uri = module.dotfiles.dotfiles_uri
6868
}
6969
```
7070

71+
## SSH vs HTTPS URLs
72+
73+
If your Git provider (e.g. GitLab, GitHub Enterprise) restricts HTTPS cloning, use an SSH URL instead:
74+
75+
```text
76+
# HTTPS (may fail if HTTP cloning is disabled)
77+
https://gitlab.example.com/user/dotfiles.git
78+
79+
# SSH (uses the workspace's SSH key)
80+
git@gitlab.example.com:user/dotfiles.git
81+
```
82+
83+
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.
84+
7185
## Setting a default dotfiles repository
7286

7387
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_
7690
module "dotfiles" {
7791
count = data.coder_workspace.me.start_count
7892
source = "registry.coder.com/coder/dotfiles/coder"
79-
version = "1.3.1"
93+
version = "1.3.2"
8094
agent_id = coder_agent.example.id
8195
default_dotfiles_uri = "https://github.com/coder/dotfiles"
8296
}

registry/coder/modules/dotfiles/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ variable "agent_id" {
2929
variable "description" {
3030
type = string
3131
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."
32-
default = "Enter a URL for a [dotfiles repository](https://dotfiles.github.io) to personalize your workspace"
32+
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."
3333
}
3434

3535
variable "default_dotfiles_uri" {

0 commit comments

Comments
 (0)