This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch doc/add-ssh-url-format-without-protocol
in repository https://gitbox.apache.org/repos/asf/maven-scm.git

commit f39a73275028b79be69efa659c922c90cc6fd601
Author: Konrad Windszus <[email protected]>
AuthorDate: Thu Nov 6 18:15:39 2025 +0100

    Describe SCM URL format without protocol prefix
    
    This is proposed by GitHub UI for SSH access in Clone -> Local -> SSH
    This is supported by both git CLI
    (https://git-scm.com/docs/git-clone#_git_urls) and JGit
---
 src/site/markdown/git.md | 28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)

diff --git a/src/site/markdown/git.md b/src/site/markdown/git.md
index aa849a49e..d01f97ce1 100644
--- a/src/site/markdown/git.md
+++ b/src/site/markdown/git.md
@@ -31,7 +31,7 @@ License: GNU General Public License v2
 
 ## SCM URL
 
-For all URLs below, we use a colon \(:\) as separator. If you use a colon for 
one of the variables \(e.g. a windows path\), then use a pipe \(|\) as 
separator. The separator for the port has to be a colon in any case since this 
part is specified in the git URL specification. See man git-fetch.
+For all URLs below, we use a colon \(:\) as separator. If you use a colon for 
one of the variables \(e.g. a windows path\), then use a pipe \(|\) as 
separator. The separator for the port has to be a colon in any case since this 
part is specified in the [Git URL 
specification](https://git-scm.com/docs/git-clone#_git_urls).
 
 ```
 scm:git:git://server_name[:port]/path_to_repository
@@ -41,15 +41,25 @@ scm:git:ssh://server_name[:port]/path_to_repository
 scm:git:file://[hostname]/path_to_repository
 ```
 
-- Examples
+An alternative SCP-like syntax may also be used with the SSH protocol where 
the protocol is left out:
 
-    ```
-    scm:git:git://github.com/path_to_repository
-    scm:git:http://github.com/path_to_repository
-    scm:git:https://github.com/path_to_repository
-    scm:git:ssh://github.com/path_to_repository
-    scm:git:file://localhost/path_to_repository
-    ```
+`scm:git:[<user>@]<host>:/<path-to-git-repo>`
+
+GitHub proposes to use this format by default without the leading slash:
+
+`scm:git:[<user>@]<host>:<path-to-git-repo>`
+
+
+### Examples
+
+```
+scm:git:git://github.com/path_to_repository
+scm:git:http://github.com/path_to_repository
+scm:git:https://github.com/path_to_repository
+scm:git:[email protected]:path_to_repository
+scm:git:ssh://github.com/path_to_repository
+scm:git:file://localhost/path_to_repository
+```
 
 ## Different Fetch and Push URLs
 

Reply via email to