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

Fetching a module from a branch with / is broken when github.com us the source #2473

Closed
lazzurs opened this issue Mar 1, 2023 · 4 comments · Fixed by #3591
Closed

Fetching a module from a branch with / is broken when github.com us the source #2473

lazzurs opened this issue Mar 1, 2023 · 4 comments · Fixed by #3591
Assignees

Comments

@lazzurs
Copy link
Contributor

lazzurs commented Mar 1, 2023

When using github.com as a source for a module in a sub directory 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 first version will run apply and plan as expected. The second version brings the following error.

`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`

Something appears to be removing the / from the branch name.

@lazzurs
Copy link
Contributor Author

lazzurs commented Mar 1, 2023

Further testing has shown the following does work

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

For now we can switch to this but the original version should work.

@denis256 denis256 added the p:needs triage Needs to be processed by maintainer and issue type / priority added label Mar 1, 2023
@kamranrana-hi
Copy link

I ran into this issue today using a Github workflow

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for raising this issue.

@yhakbar
Copy link
Collaborator

yhakbar commented Nov 22, 2024

Hey @lazzurs + @kamranrana-hi ,

As mentioned in the linked PR closing this issue, there's a quick workaround available by escaping / with the hex code %2F. Added a test so that we can reliably reproduce this guidance in the future.

Let me know if that helps!

@yhakbar yhakbar self-assigned this Nov 22, 2024
@yhakbar yhakbar removed p:needs triage Needs to be processed by maintainer and issue type / priority added stale Stale labels Nov 22, 2024
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.

4 participants