Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub https downloads break when there is a / in the branch name. #422

Open
lazzurs opened this issue Mar 2, 2023 · 1 comment · May be fixed by #430
Open

GitHub https downloads break when there is a / in the branch name. #422

lazzurs opened this issue Mar 2, 2023 · 1 comment · May be fixed by #430

Comments

@lazzurs
Copy link

lazzurs commented Mar 2, 2023

The issue appears to be with the logic here on splitting the URL based on / here

func (d *GitHubDetector) detectHTTP(src string) (string, bool, error) {

When using this in Terragrunt the following works

source = "github.com/xxx/infrastructure-modules//dev-dns-zone?ref=v0.0.1"

But this does not

source = "github.com/xxx/infrastructure-modules//dev-dns-zone?ref=feat/PTP-1841"

The error in Terragrunt clearly shows the branch name is having the part after / chopped off.

ERRO[0001] 1 error occurred:
* error downloading 'https://github.com/xxx/infrastructure-modules.git?ref=feat': /opt/homebrew/bin/git exited with 1: error: pathspec 'feat' did not match any file(s) known to git

ERRO[0001] Unable to determine underlying exit code, so Terragrunt will exit with error code 1

Issue raised in Terragrunt for this is gruntwork-io/terragrunt#2473

@cwyl02
Copy link

cwyl02 commented Apr 11, 2023

Seeing this issue in our code base as well

@cwyl02 cwyl02 linked a pull request Apr 11, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants