@@ -83,7 +83,7 @@ each print an encrypted token that is safe to commit and push to GitHub.
8383
8484### GitLab API Token
8585
86- The GitLab API token is maintaine under a machine user account and can be rotated via a
86+ The GitLab API token is maintain under a machine user account and can be rotated via a
8787POST request with the existing token. There are separate tokens for dev-portal and
8888dev-portal-dev. The script works for both depending on which cluster is currently
8989active. To rotate the dev-portal token, run
@@ -104,18 +104,22 @@ New encrypted gitlab-token for developer-portal-dev-backend:
104104< encrypted-token>
105105```
106106
107+ If the token has already expired, you will need to request a new one from a GitLab
108+ admin. With this you can use the following process for GitHub API tokens to manually
109+ create the encrypted version for the sealed secret.
110+
107111### GitHub API Token
108112
109113The GitHub API token is slightly more complicated. Currently it is linked to a user
110114account and needs to be manually rotated and copied in the user GitHub developer tools
111115settings. The same token is used for both dev-portal and dev-portal-dev, but the
112116SealedSecret needs to be encrypted by the specific cluster it will be applied to.
113117Again the script will handle this if the correct cluster is active. To update the
114- dev-portal token, run
118+ dev-portal token, copy it to your clipboard and run
115119
116120``` bash
117121$ module load argus
118- $ util/encrypt-github-token.sh < unencrypted-token >
122+ $ util/encrypt-github-token.sh $( xclip -o -selection clipboard )
119123New encrypted github-token for developer-portal-backend:
120124< encrypted-token>
121125```
@@ -124,11 +128,12 @@ or for the dev-portal-dev token
124128
125129``` bash
126130$ module load pollux
127- $ util/encrypt-github-token.sh < unencrypted-token >
131+ $ util/encrypt-github-token.sh $( xclip -o -selection clipboard )
128132New encrypted github-token for developer-portal-backend:
129133< encrypted-token>
130134```
131135
132- Note the whitespace before the command can prevent the unencrypted token being stored in
133- your shell history (requires ` HIST_IGNORE_SPACE ` for zsh or ` HISTCONTROL=ignorespace `
134- for bash).
136+ You can also pass the literal token into the command, but doing it this way means then
137+ token can't be saved to your shell history. A space before the command can also prevent the
138+ unencrypted token being in your shell history (requires ` HIST_IGNORE_SPACE ` for zsh or
139+ ` HISTCONTROL=ignorespace ` for bash), but then you can't recall the command.
0 commit comments