From 29c674e528efa686a4e787ffe8af8ca6b8a4307c Mon Sep 17 00:00:00 2001 From: Sepperlot Date: Tue, 9 Dec 2025 15:15:02 +0100 Subject: [PATCH] fix: SSH repo URLs (#716) Correct SSH URL examples to avoid confusion. Codeberg supports two different SSH URL formats with different delimiters (`:` vs `/`), but the current documentation mixes them, which can lead to misconfigurations - especially when using pattern-based Git configurations such as `includeIf "hasconfig:remote.*.url:` There are two valid SSH URL formats when accessing Codeberg repositories: 1. SCP-like syntax (colon delimiter) ```bash git@codeberg.org:/.git ``` 2. Full SSH URL syntax (slash delimiter) ```bash ssh://git@codeberg.org//.git ``` Git treats these formats differently, so inconsistent examples in documentation can cause tools or config conditions to fail. In my case, `includeIf "hasconfig:remote.*.url:"` did not match correctly because the documented format did not reflect the proper SSH URL structure. Reviewed-on: https://codeberg.org/Codeberg/Documentation/pulls/716 Reviewed-by: Gusted Co-authored-by: Sepperlot Co-committed-by: Sepperlot --- content/security/ssh-key.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/security/ssh-key.md b/content/security/ssh-key.md index 04b54ae..6536ee6 100644 --- a/content/security/ssh-key.md +++ b/content/security/ssh-key.md @@ -231,7 +231,7 @@ ssh-add # enter your passphrase once, then it is cached. Your HTTPS URL used this format: `https://codeberg.org//.git` The SSH URL uses this format: `git@codeberg.org:/.git` (optionally with `ssh://` at the beginning like - this: `ssh://git@codeberg.org:/.git`). + this: `ssh://git@codeberg.org//.git`). Alternatively, you can find the SSH URL by going to your repository page on Codeberg (for example, going to `https://codeberg.org/knut/foobar`), clicking on SSH in the top right corner and copying the URL. @@ -245,8 +245,8 @@ ssh-add # enter your passphrase once, then it is cached. The output should look like this: ```bash - origin ssh://git@codeberg.org:knut/foobar.git (fetch) - origin ssh://git@codeberg.org:knut/foobar.git (push) + origin ssh://git@codeberg.org/knut/foobar.git (fetch) + origin ssh://git@codeberg.org/knut/foobar.git (push) ``` > **Attribution**