Im learning aws cdk and trying to make a code pipeline.
i created personal access key on github and saved it on aws secret manager.
then in my cdk stack i wrote`
pipeline.addStage({
stageName:"Source",
actions:[
new CodePipelineAction.GitHubSourceAction({
actionName: 'CheckOut',
owner: 'Mahmood787',
repo: "aws-pipeline",
oauthToken: cdk.SecretValue.secretsManager('github2'),
output:sourceOutput,
branch:"master"
})
]
});
on cdk deploy im getting this error
Webhook could not be registered with GitHub. Error cause: Invalid credentials [StatusCode: 401, Body: {"message":"Bad credentials","documentation_url":"https://docs.github.com/rest"}]
is there anything im missing?