Replies: 5 comments 8 replies
-
See the docs here: https://fluxcd.io/flux/components/source/gitrepositories/#basic-access-authentication The secret should have username e.g. From docs:
|
Beta Was this translation helpful? Give feedback.
-
We use SSH key on a user (instead of PAT or deploy key on repository) and everything work well, so I close, but I still think there are possibly a bug on flux. |
Beta Was this translation helpful? Give feedback.
-
Just for reference, when creating the base64 version of the string one should take care to avoid new lines as that was only thing that made a difference in our case. bad : good: |
Beta Was this translation helpful? Give feedback.
-
I have the same issue. I can create the secret with:
The token is created as a BitBucket repo-level Access Token with Read scope. Note when creating the token, BitBucket explicitly provides an example of using it as a bearer token (so I don't understand why the flux docs seem to advise only using basic auth with all the major git hosts.) The secret is applied into the cluster and referenced in a flux gitrepo object, resulting in events with the message: |
Beta Was this translation helpful? Give feedback.
-
I had this issue as well, I create my Secret using external secrets like that:
Note I followed this doc here and it didn't work.
|
Beta Was this translation helpful? Give feedback.
-
Hi,
I am trying to set up authentication using a bearer token (personal access token on GitHub) on a GitRepository object instead of an SSH deploy key because this allows us to use branch protection.
We are running the latest version of FluxCD (2.1.0).
My secret:
My GitRepository object:
When I run the following command, I get the following error message:
I have checked the following:
git clone https://[email protected]/example/flux-config
, so I know the token is valid.I am not sure why I am getting this error. Do you have any ideas?
Thanks for your help!
Beta Was this translation helpful? Give feedback.
All reactions