Skip to content

Commit d50b565

Browse files
carlescufinashif
authored andcommitted
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 <[email protected]>
1 parent 462b13e commit d50b565

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

doc/develop/west/workspaces.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ account password. (This may be required if your account has two-factor
9595
authentication enabled, and may be preferable to storing your account password
9696
in plain text even if two-factor authentication is disabled.)
9797

98+
You can use the Git credential store to authenticate with a GitHub PAT
99+
(Personal Access Token) like so:
100+
101+
.. code-block:: shell
102+
103+
echo "https://x-access-token:$GH_TOKEN@github.com" >> ~/.git-credentials
104+
98105
If you don't want to store any credentials on the file system, you can store
99106
them in memory temporarily using `git-credential-cache`_ instead.
100107

0 commit comments

Comments
 (0)