Git clone is using the wrong URL
Trying to create a module using the required ssh://git@github.com:org/terraform-s3-bucket.git
format but it consistently fails to index in the UI. It gives this error message:
Error occurred during git clone: fatal: Could not read from remote repository.
I went in and added a print to GitModuleExtractor._clone_repository() and the ssh command looks like this:
terrareg_1 | ['git', 'clone', '--single-branch', '--branch', 'v6.0.5', 'ssh://git@github.com:org/terraform-s3-bucket.git', '/tmp/tmpo1yx9kao']
The ssh://
prefix is messing up the command. If I exec into the container and run the command manually I see this error which matches
git clone --single-branch --branch v6.0.5 ssh://git@github.com:org/terraform-s3-bucket.git
Cloning into 'terraform-s3-bucket'...
ssh: Could not resolve hostname github.com:org: Name or service not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I confirmed I am mounting my ssh key and I can manually clone in the container
Upstream bug report: https://github.com/MatthewJohn/terrareg/issues/5