Skip to content

Terraform Source: Private GitHub Repo or Git URL #8718

Answered by rarkins
ekristen asked this question in Request Help
Discussion options

You must be logged in to vote

The regex matching is quite flexible, so I think it should work:

const gitTagsRefMatchRegex = /(?:git::)?(?<url>(?:http|https|ssh):\/\/(?:.*@)?(?<path>.*.*\/(?<project>.*\/.*)))\?ref=(?<tag>.*)$/;

And it doesn't need to be public - it will try to query the repo regardless, and if the token you have provided has permissions to access the private repo then it will work

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ekristen
Comment options

@rarkins
Comment options

Answer selected by ekristen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants