From 910289079b7defbef187666700ea7d9c6f0e9df6 Mon Sep 17 00:00:00 2001 From: patrickskowronekdkfz <86347677+patrickskowronekdkfz@users.noreply.github.com> Date: Tue, 21 Jan 2025 09:35:25 +0100 Subject: [PATCH] docs: documentation for changing your configuration repository access token (#256) --- README.md | 2 ++ docs/update-access-token.md | 42 +++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 docs/update-access-token.md diff --git a/README.md b/README.md index 3c36053..b7e60ad 100644 --- a/README.md +++ b/README.md @@ -254,6 +254,8 @@ sh bridgehead uninstall ## Site-specific configuration +[How to Change Config Access Token](docs/update-access-token.md) + ### HTTPS Access Even within your internal network, the Bridgehead enforces HTTPS for all services. During the installation, a self-signed, long-lived certificate was created for you. To increase security, you can simply replace the files under `/etc/bridgehead/traefik-tls` with ones from established certification authorities such as [Let's Encrypt](https://letsencrypt.org) or [DFN-AAI](https://www.aai.dfn.de). diff --git a/docs/update-access-token.md b/docs/update-access-token.md new file mode 100644 index 0000000..d608d45 --- /dev/null +++ b/docs/update-access-token.md @@ -0,0 +1,42 @@ +## How to Change Config Access Token + +### 1. Generate a New Access Token + +1. Go to your Git configuration repository provider, it might be either [git.verbis.dkfz.de](https://git.verbis.dkfz.de) or [gitlab.bbmri-eric.eu](https://gitlab.bbmri-eric.eu). +2. Navigate to the configuration repository for your site. +3. Go to **Settings → Access Tokens** to check if your Access Token is valid or expired. + - **If expired**, create a new Access Token. +4. Configure the new Access Token with the following settings: + - **Expiration date**: One year from today, minus one day. + - **Role**: Developer. + - **Scope**: Only `read_repository`. +5. Save the newly generated Access Token in a secure location. + +--- + +### 2. Replace the Old Access Token + +1. Navigate to `/etc/bridgehead` in your system. +2. Run the following command to retrieve the current Git remote URL: + ```bash + git remote get-url origin + ``` + Example output: + ``` + https://name40dkfz-heidelberg.de:@git.verbis.dkfz.de/bbmri-bridgehead-configs/test.git + ``` +3. Replace `` with your new Access Token in the URL. +4. Set the updated URL using the following command: + ```bash + git remote set-url origin https://name40dkfz-heidelberg.de:@git.verbis.dkfz.de/bbmri-bridgehead-configs/test.git + + ``` + +5. Start the Bridgehead update service by running: + ```bash + systemctl start bridgehead-update@ + ``` +6. View the output to ensure the update process is successful: + ```bash + journalctl -u bridgehead-update@ -f + ``` \ No newline at end of file