From d50b5658bbbb0fa32bf0a635030a88bed77e878d Mon Sep 17 00:00:00 2001 From: Carles Cufi Date: Tue, 26 Apr 2022 16:41:49 +0200 Subject: [PATCH] doc: west: Add an example of using the credential store for GitHub A simple one-liner to help users authenticate with GitHub using its Personal Access Token and the Git credential store. Signed-off-by: Carles Cufi --- doc/develop/west/workspaces.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/develop/west/workspaces.rst b/doc/develop/west/workspaces.rst index dfee896d2c..fe92618f2a 100644 --- a/doc/develop/west/workspaces.rst +++ b/doc/develop/west/workspaces.rst @@ -95,6 +95,13 @@ account password. (This may be required if your account has two-factor authentication enabled, and may be preferable to storing your account password in plain text even if two-factor authentication is disabled.) +You can use the Git credential store to authenticate with a GitHub PAT +(Personal Access Token) like so: + +.. code-block:: shell + + echo "https://x-access-token:$GH_TOKEN@github.com" >> ~/.git-credentials + 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.