mirror of
https://codeberg.org/Codeberg/Documentation.git
synced 2026-06-16 05:13:54 -07:00
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:<user>/<repo>.git ``` 2. Full SSH URL syntax (slash delimiter) ```bash ssh://git@codeberg.org/<user>/<repo>.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 <gusted@noreply.codeberg.org> Co-authored-by: Sepperlot <sepperlot@noreply.codeberg.org> Co-committed-by: Sepperlot <sepperlot@noreply.codeberg.org>
This commit is contained in:
parent
eec6e02abf
commit
29c674e528
1 changed files with 3 additions and 3 deletions
|
|
@ -231,7 +231,7 @@ ssh-add # enter your passphrase once, then it is cached.
|
||||||
|
|
||||||
Your HTTPS URL used this format: `https://codeberg.org/<user>/<repo>.git`
|
Your HTTPS URL used this format: `https://codeberg.org/<user>/<repo>.git`
|
||||||
The SSH URL uses this format: `git@codeberg.org:<user>/<repo>.git` (optionally with `ssh://` at the beginning like
|
The SSH URL uses this format: `git@codeberg.org:<user>/<repo>.git` (optionally with `ssh://` at the beginning like
|
||||||
this: `ssh://git@codeberg.org:<user>/<repo>.git`).
|
this: `ssh://git@codeberg.org/<user>/<repo>.git`).
|
||||||
|
|
||||||
Alternatively, you can find the SSH URL by going to your repository page on Codeberg
|
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.
|
(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:
|
The output should look like this:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
origin ssh://git@codeberg.org:knut/foobar.git (fetch)
|
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 (push)
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Attribution**
|
> **Attribution**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue