Closed frittsy closed 1 month ago
Created gitlab issue: https://gitlab.dockstudios.co.uk/pub/terrareg/-/issues/536 gitlab-issue-id:536
Apologies, I just discovered that support for PATs was (conveniently) added in v3.10.0, through the use of UPSTREAM_GIT_CREDENTIALS_PASSWORD
. This more than suffices for my need and is preferred to ssh, so I'm going to close this issue.
Hey @frittsy,
You should also be able to provide the URL in the format hinted to on the module creation page:
ssh://git@ssh.dev.azure.com/v3/fabrikam-fiber/FabrikamFiber/FabrikamFiber
Hope this helps
Thanks Matt
Azure DevOps has an unusual URL format for cloning git repositories via ssh. As an example from their documentation:
Using
v3
effectively as a port number is incompatible with terrareg and produces an error saying the "URL contains a invalid port". I tried both removing it and using port 22 in place ofv3
, but both fail to connect to the repository. Granted this could be user error of some other sort (I did setSSH_PRIVATE_KEY
and it appears to be setup correctly), but I'm thinking that Azure DevOps may requirev3
in the URL for this to work properly.There is an alternative (preferred) authentication method for cloning which is to use a personal access token in the https url, such as:
where
{pat}
would be replaced with the token. But I don't think terrareg would support that template replacement and I don't want to hardcode/leak my PAT in every git clone url either, so I'm trying to make SSH work.Any ideas would be appreciated! ❤️