From 4bdaffdf54fc5d15e70ba3beb7c397e98cb36e81 Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Tue, 22 Mar 2022 17:15:48 +0200 Subject: [PATCH] doc: west: Add mention about Git rewrite feature Add Git rewrite feature mention, which can simplify handling of HTTPS URLs. Signed-off-by: Andrei Emeltchenko --- doc/guides/west/workspaces.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/guides/west/workspaces.rst b/doc/guides/west/workspaces.rst index a46d46d8053..dfee896d2cc 100644 --- a/doc/guides/west/workspaces.rst +++ b/doc/guides/west/workspaces.rst @@ -98,6 +98,13 @@ in plain text even if two-factor authentication is disabled.) If you don't want to store any credentials on the file system, you can store them in memory temporarily using `git-credential-cache`_ instead. +If you setup fetching via SSH, you can use Git URL rewrite feature. The following +command instructs Git to use SSH URLs for GitHub instead of HTTPS ones: + +.. code-block:: shell + + git config --global url."git@github.com:".insteadOf "https://github.com/" + .. _git-credential-store: https://git-scm.com/docs/git-credential-store#_examples .. _git-credential-cache: