Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions source/How-To-Guides/Releasing/_Personal-Access-Token.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.. warning::

If the file ``~/.config/bloom`` exists on your computer, it is likely that you have done this before so you should skip this section.

During the release process, multiple HTTPS Git operations will be performed that require password authentication.
To avoid being repeatedly asked for a password, a `Personal Access Token (PAT) <https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token>`_ will be set up.
If you have multi-factor authentication setup on your GitHub account, you **must** setup a Personal Access Token.
Expand All @@ -21,9 +17,18 @@ After you have created the token, you will end up back at the *Personal access t

Save your GitHub username and PAT to a new file called ``~/.config/bloom``, with the format below:

.. code-block:: text
Configure in your `~/.gitconfig` that your GitHub account and PAT are used for all release repositories under https://github.com/ros2-gbp:

.. code-block:: ini

[credential "https://github.com/ros2-gbp"]
username = x-access-token
helper = "!f() { test \"$1\" = get && echo \"password=<token-you-created-for-bloom>\"; }; f"

You can additionally use different GitHub accounts and PATs for different release repos:

.. code-block:: ini

{
"github_user": "<your-github-username>",
"oauth_token": "<token-you-created-for-bloom>"
}
[credential "https://github.com/ros2-gbp/my_package-release.git"]
username = x-access-token
helper = "!f() { test \"$1\" = get && echo \"password=<other-token-you-created-for-bloom>\"; }; f"