How can I troubleshoot issues with associating Git repositories and Amazon SageMaker notebooks?
Last updated: 2020-09-22
I'm trying to link a Git repository with an Amazon SageMaker notebook, but I'm getting one or more of the following errors:
- "fatal: could not read Username for 'https://gitlab.com/xxxx/aws_tests_git_1.git': terminal prompts disabled"
- "fatal: Authentication failed for 'https://gitlab.com/xxxx/aws_tests_git_1.git/"
- "Failed to connect to https://gitlab.com/xxxx/aws_tests_git_1.git port 443: Connection timed out"
- "No space left on device while cloning Git repo. Please try using a larger volume"
"fatal: could not read Username for 'https://gitlab.com/xxxx/aws_tests_git_1.git': terminal prompts disabled"
This error happens when either the Git repository URL is wrong, or when the password contains a forward slash character ("/").
"fatal: Authentication failed for 'https://gitlab.com/xxxx/aws_tests_git_1.git/"
This error happens when you specify the wrong credentials. It's a best practice to use an AWS Secrets Manager secret to store the Git credentials. Be sure that the AWS Identity and Access Management (IAM) role that you use to create the secret allows secretsmanager:GetSecretValue in its IAM policy. For more information, see Add a Git repository to your Amazon SageMaker account.
"Failed to connect to https://gitlab.com/xxxx/aws_tests_git_1.git port 443: Connection timed out"
This error usually happens because of a misconfiguration in the network access control list (network ACL), security group, or route table.
- Be sure that the route table has an internet gateway or NAT gateway.
- Be sure that the SageMaker notebook security group has an outbound rule that allows all outgoing traffic.
If you're connecting to an on-premises repository, be sure that the subnet that you select for the notebook has a private connection to the repository. Be sure that the firewall for the on-premises server allows the subnet's CIDR block.
If you're connecting to a repository in AWS CodeCommit, you can associate the virtual private cloud (VPC) with the following CodeCommit endpoints to create a private connection:
For more information, see Using CodeCommit with interface VPC endpoints.
"No space left on device while cloning Git repo. Please try using a larger volume"
SageMaker clones the repository contents to your notebook instance. This helps assure that your notebook instance has the most recent data from the Git repository. If you run out of disk space, specify a larger value for VolumeSizeInGB.