From de71cb672f105e467732604018f4a997605d525b Mon Sep 17 00:00:00 2001 From: Lucien Boix Date: Fri, 6 Oct 2023 17:45:47 -0400 Subject: [PATCH 1/6] Update gitrepositories.md Adding two tips when using the ssh URL of a Git repo Signed-off-by: Lucien Boix --- docs/spec/v1/gitrepositories.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/spec/v1/gitrepositories.md b/docs/spec/v1/gitrepositories.md index 4170d9f1b..070ca4186 100644 --- a/docs/spec/v1/gitrepositories.md +++ b/docs/spec/v1/gitrepositories.md @@ -106,6 +106,8 @@ Git repository. is not supported for SSH addresses (e.g. `user@example.com:repository.git`). Instead, the valid URL format is `ssh://user@example.com:22/repository.git`. +If your provider gives you a ssh URL containing an extra `:` not related to a port (gitlab.com does that) then simply replace it with a `/` like this : `ssh://git@gitlab.com:root_group/a_group/your_repo.git` => `ssh://git@gitlab.com/root_group/a_group/your_repo.git` + ### Secret reference `.spec.secretRef.name` is an optional field to specify a name reference to a @@ -195,8 +197,10 @@ stringData: -----BEGIN OPENSSH PRIVATE KEY----- ... -----END OPENSSH PRIVATE KEY----- + #github.com usage example : base64 below the correct line (github.com ecdsa-sha2-nistp256) of this command output: ssh-keyscan github.com + #gitlab.com usage example : base64 below the correct line (gitlab.com ecdsa-sha2-nistp256) of this command output: ssh-keyscan gitlab.com known_hosts: | - github.com ecdsa-sha2-nistp256 AAAA... + Z2l0bGFiLmNvbSBlY2Rz... ``` Alternatively, the Flux CLI can be used to automatically create the From 0085ea0d54b542db27bc9ad7d56bf0c050dba727 Mon Sep 17 00:00:00 2001 From: Lucien Boix Date: Tue, 10 Oct 2023 15:43:43 -0400 Subject: [PATCH 2/6] Review with @stefanprodan Signed-off-by: Lucien Boix --- docs/spec/v1/gitrepositories.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/spec/v1/gitrepositories.md b/docs/spec/v1/gitrepositories.md index 070ca4186..605ed0b56 100644 --- a/docs/spec/v1/gitrepositories.md +++ b/docs/spec/v1/gitrepositories.md @@ -103,10 +103,8 @@ Git repository. **Note:** Unlike using `git`, the [shorter scp-like syntax](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols#_the_ssh_protocol) -is not supported for SSH addresses (e.g. `user@example.com:repository.git`). -Instead, the valid URL format is `ssh://user@example.com:22/repository.git`. - -If your provider gives you a ssh URL containing an extra `:` not related to a port (gitlab.com does that) then simply replace it with a `/` like this : `ssh://git@gitlab.com:root_group/a_group/your_repo.git` => `ssh://git@gitlab.com/root_group/a_group/your_repo.git` +is not supported for SSH addresses (e.g. gitlab.com will give you this pattern when you clone a project `ssh://git@gitlab.com:root_group/a_group/your_repo.git`). +In that case, the valid URL format is `ssh://git@gitlab.com/root_group/a_group/your_repo.git`. ### Secret reference @@ -200,7 +198,7 @@ stringData: #github.com usage example : base64 below the correct line (github.com ecdsa-sha2-nistp256) of this command output: ssh-keyscan github.com #gitlab.com usage example : base64 below the correct line (gitlab.com ecdsa-sha2-nistp256) of this command output: ssh-keyscan gitlab.com known_hosts: | - Z2l0bGFiLmNvbSBlY2Rz... + github.com ecdsa-sha2-nistp256 AAAA... ``` Alternatively, the Flux CLI can be used to automatically create the From f41c41d775a63e6765c51c231966dec7c5544c8e Mon Sep 17 00:00:00 2001 From: Lucien Boix Date: Tue, 10 Oct 2023 17:34:56 -0400 Subject: [PATCH 3/6] Review with @darkowlzz Signed-off-by: Lucien Boix --- docs/spec/v1/gitrepositories.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/spec/v1/gitrepositories.md b/docs/spec/v1/gitrepositories.md index 605ed0b56..76a2a5791 100644 --- a/docs/spec/v1/gitrepositories.md +++ b/docs/spec/v1/gitrepositories.md @@ -103,8 +103,8 @@ Git repository. **Note:** Unlike using `git`, the [shorter scp-like syntax](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols#_the_ssh_protocol) -is not supported for SSH addresses (e.g. gitlab.com will give you this pattern when you clone a project `ssh://git@gitlab.com:root_group/a_group/your_repo.git`). -In that case, the valid URL format is `ssh://git@gitlab.com/root_group/a_group/your_repo.git`. +is not supported for SSH addresses (e.g. `user@example.com:repository.git`). +Instead, the valid URL format is `ssh://user@example.com/repository.git` (only 1 `:` allowed). ### Secret reference @@ -195,8 +195,8 @@ stringData: -----BEGIN OPENSSH PRIVATE KEY----- ... -----END OPENSSH PRIVATE KEY----- - #github.com usage example : base64 below the correct line (github.com ecdsa-sha2-nistp256) of this command output: ssh-keyscan github.com - #gitlab.com usage example : base64 below the correct line (gitlab.com ecdsa-sha2-nistp256) of this command output: ssh-keyscan gitlab.com + #github.com usage example : copy-paste below the correct line (github.com ecdsa-sha2-nistp256...) of this command output: ssh-keyscan github.com + #gitlab.com usage example : copy-paste below the correct line (gitlab.com ecdsa-sha2-nistp256...) of this command output: ssh-keyscan gitlab.com known_hosts: | github.com ecdsa-sha2-nistp256 AAAA... ``` From 9c1e667035194f86f31c2af5137eeb0f0d26fb63 Mon Sep 17 00:00:00 2001 From: Lucien Boix Date: Tue, 10 Oct 2023 17:39:13 -0400 Subject: [PATCH 4/6] Review with @darkowlzz Signed-off-by: Lucien Boix --- docs/spec/v1/gitrepositories.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/spec/v1/gitrepositories.md b/docs/spec/v1/gitrepositories.md index 76a2a5791..63ab67a46 100644 --- a/docs/spec/v1/gitrepositories.md +++ b/docs/spec/v1/gitrepositories.md @@ -196,7 +196,6 @@ stringData: ... -----END OPENSSH PRIVATE KEY----- #github.com usage example : copy-paste below the correct line (github.com ecdsa-sha2-nistp256...) of this command output: ssh-keyscan github.com - #gitlab.com usage example : copy-paste below the correct line (gitlab.com ecdsa-sha2-nistp256...) of this command output: ssh-keyscan gitlab.com known_hosts: | github.com ecdsa-sha2-nistp256 AAAA... ``` From de0030885d1391dbfae3509e80c978b95f985ffa Mon Sep 17 00:00:00 2001 From: Lucien Boix Date: Tue, 10 Oct 2023 17:42:47 -0400 Subject: [PATCH 5/6] Review with @darkowlzz Signed-off-by: Lucien Boix --- docs/spec/v1/gitrepositories.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/spec/v1/gitrepositories.md b/docs/spec/v1/gitrepositories.md index 63ab67a46..0eb5401b0 100644 --- a/docs/spec/v1/gitrepositories.md +++ b/docs/spec/v1/gitrepositories.md @@ -196,6 +196,7 @@ stringData: ... -----END OPENSSH PRIVATE KEY----- #github.com usage example : copy-paste below the correct line (github.com ecdsa-sha2-nistp256...) of this command output: ssh-keyscan github.com + #if your repo is elsewhere : replace github.com with the right host known_hosts: | github.com ecdsa-sha2-nistp256 AAAA... ``` From a16859ac4302f2a680949f372c39967197e54409 Mon Sep 17 00:00:00 2001 From: Lucien Boix Date: Fri, 20 Oct 2023 22:14:39 -0400 Subject: [PATCH 6/6] Update docs/spec/v1/gitrepositories.md Co-authored-by: Hidde Beydals Signed-off-by: Lucien Boix --- docs/spec/v1/gitrepositories.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/spec/v1/gitrepositories.md b/docs/spec/v1/gitrepositories.md index 0eb5401b0..20d46ad89 100644 --- a/docs/spec/v1/gitrepositories.md +++ b/docs/spec/v1/gitrepositories.md @@ -195,8 +195,7 @@ stringData: -----BEGIN OPENSSH PRIVATE KEY----- ... -----END OPENSSH PRIVATE KEY----- - #github.com usage example : copy-paste below the correct line (github.com ecdsa-sha2-nistp256...) of this command output: ssh-keyscan github.com - #if your repo is elsewhere : replace github.com with the right host + # The list of public SSH host keys can be obtained by running `ssh-keyscan ` known_hosts: | github.com ecdsa-sha2-nistp256 AAAA... ```