Assistance Required: Changing PAT in Flux System #5133
-
Hi Team, I have a question regarding the usage of Personal Access Tokens (PAT) within the Flux system, specifically around replacing an existing PAT. Currently, the PAT in use is associated with my personal user account rather than a dedicated technical user account. This necessitates changing the PAT to align with best practices and ensure continuity. However, I am unsure of the implications this change might have on my existing Flux repository. The documentation I’ve reviewed so far, such as the one below, mainly addresses setting up new environments rather than modifying an existing PAT: Does anyone have experience with changing the PAT in an existing environment? Alternatively, are there any specific documents or resources that detail the process and its potential impact? Looking forward to your guidance. Best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Here are the docs for rotating the key https://fluxcd.io/flux/installation/configuration/deploy-key-rotation/ If you've used Git over HTTPS with a PAT instead of SSH, in your case the procedure is: # delete exiting PAT secret
kubectl -n flux-system delete secret flux-system
# generate new PAT secret
flux create secret git flux-system \
--url=https://github.com/org/repo \
--username=flux \
--password=$GITHUB_PAT
# test the Git access
flux reconcile source git flux-system |
Beta Was this translation helpful? Give feedback.
-
Hello @stefanprodan, Thank you very much for your quick help! With your help I could change the PAT from my personal account to the technical user's PAT. Regards, |
Beta Was this translation helpful? Give feedback.
Here are the docs for rotating the key https://fluxcd.io/flux/installation/configuration/deploy-key-rotation/
If you've used Git over HTTPS with a PAT instead of SSH, in your case the procedure is: