aws-samples / mlops-sagemaker-github-actions

MLOps example using Amazon SageMaker Pipeline and GitHub Actions
https://aws.amazon.com/blogs/machine-learning/build-an-end-to-end-mlops-pipeline-using-amazon-sagemaker-pipelines-github-and-github-actions/
MIT No Attribution
67 stars 41 forks source link

Can't git clone #10

Closed mtora-lightbox closed 1 year ago

mtora-lightbox commented 1 year ago

I have succesfully created the organizational template and a sagemaker project using the template. However when I try to git clone, the following error occurs- Cloning into 'MY-PRIVATE-REPO'... fatal: unable to access 'https://codestar-connections.us-east-1.amazonaws.com/git-http/123456789/us-east-1/UNIQUE-ID/Private-repo.git/ ': The requested URL returned error: 403. I have set up codestar connection, IAM policies and github personal access token but unable to resolve the issue. Also followed this https://pooya.io/how-to-access-github-and-bitbucket-using-aws-codestar/ as mentioned in the other closed issue. Any help would be greatly appreciated! Thanks

pooyavahidi commented 1 year ago

Hi @moumitaTora, As you suggested (403 error), this is a permission issue somewhere which needs a bit of troubleshooting. If you have followed the steps in the blog, you should have the access. One other common place that I saw this problem solved was at the GitHub side. You need to give permission to the AWS app to access your repo. https://docs.github.com/en/apps/using-github-apps/authorizing-github-apps

mtora-lightbox commented 1 year ago

Thank you for your response. I have been trying to attach the codestar policy (mentioned at the end of this blog https://pooya.io/how-to-access-github-and-bitbucket-using-aws-codestar/) to the role SageMakerGithubWorkflowTriggerLambdaExecutionRole that gets created when I create a new project. Should I be adding it somewhere else?

mtora-lightbox commented 1 year ago

solved, had to add policy to studio execution role