Comments (10)
Hi @denis256, thanks for looking into this. If you look at my original quote, I did try without the .git
piece terragrunt scaffold https://gitlab.com/rivian/dc/platform//terraform-modules//s3
failed.
The error suggests to me that there is an assumption about directory level. Your example apparently uses a personal GitLab project which is always two levels deep: gitlab.com/<username>/<projectname>
-- and that works. Compare that to the error I am getting:
❯ terragrunt scaffold https://gitlab.com/rivian/dc/platform//terraform-modules//s3
remote: The project you were looking for could not be found or you don't have permission to view it.
fatal: repository 'https://gitlab.com/rivian/dc.git/' not found
WARN[0000] Failed to find last release tag for git::https://gitlab.com/rivian/dc.git
INFO[0000] Scaffolding a new Terragrunt module git::https://gitlab.com/rivian/dc.git//platform/terraform-modules/s3 to /Users/gmaghera/Workspaces/dc-terraform/tools/us-east-2/scaffold-sandbox
ERRO[0002] error downloading 'https://gitlab.com/rivian/dc.git': /usr/local/bin/git exited with 128: Cloning into '/var/folders/1q/b7d7p2g91fddxq6jwt237cdm6xcxmy/T/getter1330873649/temp'...
remote: The project you were looking for could not be found or you don't have permission to view it.
fatal: repository 'https://gitlab.com/rivian/dc.git/' not found
ERRO[0002] Unable to determine underlying exit code, so Terragrunt will exit with error code 1
The project path is https://gitlab.com/rivian/dc/platform//terraform-modules/s3
,
but the error say this fatal: repository 'https://gitlab.com/rivian/dc.git/' not found
.
"dc" is a group not a git project, and you gotta go two levels deeper before the s3
project is found.
(and I see that I used the //
notation twice, by accident, but I get the same exact error with just one or none, too.)
from terragrunt.
Hi,
git ssh URLs are also not handled correctly?
from terragrunt.
I suspect wasn't used .git
URL to clone repo
In my tests for https://gitlab.com/denis256/terragrunt-tests I used:
$ terragrunt scaffold https://gitlab.com/denis256/terragrunt-tests.git//scaffold/default-template
INFO[0000] Scaffolding a new Terragrunt module git::https://gitlab.com/denis256/terragrunt-tests.git//scaffold/default-template?ref=v10.0.0 to /tmp/test1
INFO[0004] Running boilerplate generation to /tmp/test1
[boilerplate] 2024/03/28 20:43:07 Loading boilerplate config from /tmp/boilerplate967725454/boilerplate.yml
[boilerplate] 2024/03/28 20:43:07 Loading boilerplate config from /tmp/boilerplate967725454/boilerplate.yml
INFO[0004] Scaffolding completed
$ terragrunt scaffold gitlab.com/denis256/terragrunt-tests.git//scaffold/default-template
INFO[0000] Scaffolding a new Terragrunt module git::https://gitlab.com/denis256/terragrunt-tests.git//scaffold/default-template?ref=v10.0.0 to /tmp/test1
INFO[0004] Running boilerplate generation to /tmp/test1
INFO[0004] /tmp/test1/terragrunt.hcl was updated
INFO[0004] Scaffolding completed
from terragrunt.
Using .git
on the end of the clone url is something of a github thing. It's not strictly necessary, and for example, codecommit doesn't use/support it at all.
from terragrunt.
@lorengordon I am not sure about GitHub, but with GitLab if you go into the web UI both SSH and HTTPS URLs end in .git. But they do work without it too.
from terragrunt.
Hi, git ssh URLs are also not handled correctly?
Apparently not. Or I'm not using the call signature correctly...
~/Workspaces/dc-terraform/tools/us-east-2/scaffold-sandbox experiment-with-scaffold* 1h 36s
(⎈|dev-us-east-1:kube-system)❯ terragrunt scaffold [email protected]:rivian/dc/platform/terraform-modules/s3.git
INFO[0002] Scaffolding a new Terragrunt module git::ssh://[email protected]/rivian/dc/platform/terraform-modules/s3.git?ref=4.2.0 to /Users/gmaghera/Workspaces/dc-terraform/tools/us-east-2/scaffold-sandbox
ERRO[0002] error downloading 'ssh://[email protected]/rivian/dc/platform/terraform-modules/s3.git?ref=4.2.0': /usr/local/bin/git exited with 128: fatal: not a git repository (or any of the parent directories): .git
ERRO[0002] Unable to determine underlying exit code, so Terragrunt will exit with error code 1
~/Workspaces/dc-terraform/tools/us-east-2/scaffold-sandbox experiment-with-scaffold*
(⎈|dev-us-east-1:kube-system)❯ terragrunt scaffold [email protected]:rivian/dc/platform/terraform-modules/s3
INFO[0001] Scaffolding a new Terragrunt module git::ssh://[email protected]/rivian/dc/platform/terraform-modules/s3?ref=4.2.0 to /Users/gmaghera/Workspaces/dc-terraform/tools/us-east-2/scaffold-sandbox
ERRO[0001] error downloading 'ssh://[email protected]/rivian/dc/platform/terraform-modules/s3?ref=4.2.0': /usr/local/bin/git exited with 128: fatal: not a git repository (or any of the parent directories): .git
ERRO[0001] Unable to determine underlying exit code, so Terragrunt will exit with error code 1
from terragrunt.
Hi,
yes, there is an issue... happens in my tests too, after some debugging looks like it is an issue in go-getter
library which is used to pull content, something similar happens in go-getter
CLI too
$ go-getter "github.com/denis256/s3.git//module2" /tmp/qwe
2024/04/01 18:01:56 success!
$ go-getter "gitlab.com/denis25-tests/dc/platform/terraform-modules/s3.git//module2" /tmp/qwe
2024/04/01 18:02:19 Error downloading: error downloading 'https://gitlab.com/denis25-tests/dc.git': /usr/bin/git exited with 128: Cloning into '/tmp/getter72444115/temp'...
remote: The project you were looking for could not be found or you don't have permission to view it.
fatal: repository 'https://gitlab.com/denis25-tests/dc.git/' not found
Will raise an issue in the library GH project
from terragrunt.
from terragrunt.
Thanks for the update @denis256.
from terragrunt.
@denis256 could you remove the "awaiting response" label? Is there something else I can provide?
from terragrunt.
Related Issues (20)
- OpenTelemetry - support trace id + set error on spans if module run fails HOT 1
- Terragrunt Provider Cache not working properly when using it with Atlantis HOT 17
- Remove need for repetitive boilerplate terragrunt.hcl
- Dependency genelet/determined containing BUSL-1.1 licensed code HOT 4
- Remote state backend S3 accesslogging bucket ACL is not configured for bucket owner
- terragrunt plan/apply dependency warnings HOT 1
- Help with set variables via gitlab-ci
- Increase fetch timeout / make it configurable
- SSE-S3 bucket encryption enabled but "Encryption is not enabled" message still appears
- Add context deadline exceeded to default retryable errors HOT 1
- Vulnerability in go-getter v1.7.1 CVE-2024-3817
- Create `.terraform.lock.hcl` when using provider cache HOT 1
- Provider Caching not working as expected, still seeing multiple same version providers, disk usage is still the same. HOT 6
- Flaky TestJsonHcl test HOT 1
- `run-all init` fails with parallelism HOT 6
- Propagate Parent Span ID in OpenTelemetry Tracing HOT 1
- When `disable: true` on `generate` block after it has been enabled, cached file is not removed HOT 2
- After 0.57.8 → 0.57.9, provider registry Locked HOT 12
- Broken tfplan.json if --terragrunt-include-module-prefix is used HOT 1
- Terragrunt IAC Engine Plugin System HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terragrunt.