GoogleCloudPlatform / GoogleCloudPlatform/cloud-builders-community

configuring tf to pull module code from google source repository causes failure /usr/bin/git exited with 128:

Open
#357 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
1.3k
Forks
848
PR merge metrics
No merged PRs in 30d

Description

## Affected builder image

`gcr.io/cloud-builders-community/terraform `

## Expected Behavior
module code should be pulled from the google source repository
## Actual Behavior
getting the following error:
Downloading git::https://source.developers.google.com:2022/p/projectname/r/reponame.git for bla...
Step #2:
Step #2: Error: Failed to download module
Step #2:
Step #2: Could not download module "BLA" (main.tf:34) source code from
Step #2: "git::https://source.developers.google.com:2022/p/projectname/r/reponame.git":
Step #2: error downloading
Step #2: 'https://source.developers.google.com:2022/p/projectname/r/reponame.git ':
Step #2: /usr/bin/git exited with 128: Cloning into '.terraform/modules/bla'...
Step #2: fatal: unable to access
Step #2: 'https://source.developers.google.com:2022/p/projectname/r/reponame.git/':
Step #2: gnutls_handshake() failed: An unexpected TLS packet was received.
## Steps to Reproduce the Problem

1. create google source repository
2. upload module code
3. configure tf main.tf to pull module code from google source repository using https
4. trigger cloud build, - look for error

## Additional Info
not sure how to make this work with ssh either, as I dont know what key is in the docker container when this is being executed and how to assign permissinos to it in the google source repository.

Contributor guide

Open the contributing guide

Research direction

Start with the Terraform module source at main.tf:34 and reproduce the download in the gcr.io/cloud-builders-community/terraform builder during Cloud Build. Inspect how the builder invokes /usr/bin/git for the Google source repository and compare HTTPS and SSH behavior; done means the module downloads successfully without the TLS or authentication failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, google-cloud, terraform
Domain
cloud, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.