Github: Using deployment key without a PAT after bootstrapping #2694
-
We would like to get rid of the PAT, or more specifically remove the connection between the PAT and the deploy key. So I tried the following workaround and it seems to work. My question would be if this is advisable, or do you see any issue with this approach?
As only the deploy key is known to the K8s cluster and not the PAT, all functionality should still work exactly like before. Is this correct? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
You can delete the flux-system secret after bootstrap, then generate a new deploy key with PS. I've added the above procedure to the docs in this PR fluxcd/website#912 |
Beta Was this translation helpful? Give feedback.
-
Seems like switching from Github PAT to ssh keys is not just delete key and generate new, as in my case I also had to switch the repository URL from
And if you have flux setup spanning across multiple repositories, picking up existing ssh key oneliner: |
Beta Was this translation helpful? Give feedback.
You can delete the flux-system secret after bootstrap, then generate a new deploy key with
flux create secret git flux-system
. This command will generate a private key, a public key and knownhost keys, it saves them all in-cluster then prints the public key.\PS. I've added the above procedure to the docs in this PR fluxcd/website#912