Not able to send GitHub usr invitation
A660988 opened this issue · 5 comments
I am using upbound coopnorge/provider-github@v0.10.0 provider and fine-grined token.
created provider-config and secret.
Below is my claim for user invitation:
apiVersion: user.github.upbound.io/v1alpha1
kind: Membership
metadata:
annotations:
meta.upbound.io/example-id: user/v1alpha1/membership
labels:
testing.upbound.io/example-name: membership_for_some_user
name: membership-for-some-user
spec:
forProvider:
role: member
username: user-github-id
providerConfigRef:
name: default
After claiming it says external resource created. But invitation does not go to user
can you post some related logs of the provider and the status field of the resource?
Thanks for reply
I have fetched the object and it is giving me error
- lastTransitionTime: "2024-06-24T06:30:04Z"
message: 'apply failed: this resource can only be used in the context of an organization,
"GLB-ATOS-MSCC" is a user:
I have used fine Fine-grained access token.
I check document and it says to use GitHub App user access tokens.
So I am going to try with GitHub App user access tokens.
are you in a github organization? If so, are you sure you are pointing (in the providerconfig) to the right one? This resource only works in organizations.
Ref: https://registry.terraform.io/providers/integrations/github/latest/docs/resources/membership
Thanks for your help. I was not able to invite users due to 2 things:
- Did not use the GitHub app user access token
- Did not use valid github provider config.
I modified github providerConfig and used GitHub app access token instead of PAT and it worked.