Repository: gruntwork-io/terragrunt (language: go)

Issue:
TF Repo Download Failure Using Https (0.55.19)
**Describe the bug**
As of v0.55.19 there seems to be a problem with downloading external Terraform Repositories over https.

We install the latest version of TG in our pipelines and i believe this has been working without problems starting from 0.45.2.
I have done tests locally and it works with the previous release 0.55.18 and i also ran multiple pipelines successfully yesterday with 0.55.18.

Looking at the example download commands (see below) it seems that it's trying to access the repo with a file connection instead of using https connection to the remote repository.


**To Reproduce**
Setup a connection to a remote git repository to download TF Code using a https connection.


```hcl
terraform {
  source = "git::https://[name]@dev.azure.com/[name]/[project-name]/_git/[repo-name]//?ref=refs/heads/develop"
}
```

**Expected behavior**
Download the external referenced terraform git branch from remote repository.

**Nice to have**
Comparison TG Cmd fm. ADO Pipeline Download Working/non Working examples:

Working: 			Downloading Terraform configurations from git::https://[name]@dev.azure.com/[name]/[project-name]/_git/[repo-name]?ref=refs/heads/develop

Failing (0.55.19): 	Downloading Terraform configurations from git::file:///home/vsts/work/1/s/[folder]/[env]/[module]/[name]@dev.azure.com/[name]/[project-name]/_git/[repo-name]?ref=refs/heads/develop


**Versions**
- Terragrunt version: 0.55.19
- Terraform version: 1.7.5
- Environment details (Ubuntu 20.04, Windows 10, etc.): Tested from Windows 10 and pipelines running on ubuntu 22.04. Testing locally, reverting to 0.55.18 works fine on Windows 10.



Discussion / hints:
We experience the same problem since version 0.55.19. Same behaivor as @pistvaktslegenden showed.
Same behavior as well, the new version [v0.55.19](https://github.com/gruntwork-io/terragrunt/releases/tag/v0.55.19) introduced some changes about **_Fix URL handling in the scaffold command_**, I believe this is what's causing problems. this has huge impact but going back to the previous version solved the issue for us.

Fix patch:
diff --git a/terraform/source.go b/terraform/source.go
index 6175b44b33..41cdab368c 100644
--- a/terraform/source.go
+++ b/terraform/source.go
@@ -19,7 +19,7 @@ import (
 
 var (
 	forcedRegexp     = regexp.MustCompile(`^([A-Za-z0-9]+)::(.+)$`)
-	httpSchemeRegexp = regexp.MustCompile(`(?i)https?://`)
+	httpSchemeRegexp = regexp.MustCompile(`(?i)^https?://`)
 )
 
 const matchCount = 2


Test patch:
diff --git a/terraform/source_test.go b/terraform/source_test.go
index 7ddb43787b..663e3283a2 100644
--- a/terraform/source_test.go
+++ b/terraform/source_test.go
@@ -68,13 +68,16 @@ func TestToSourceUrl(t *testing.T) {
 		expectedSourceURL string
 	}{
 		{"https://github.com/gruntwork-io/repo-name", "git::https://github.com/gruntwork-io/repo-name.git"},
-		{"git::https://github.com/gruntwork-io/repo-name", "git::https://github.com/gruntwork-io/repo-name.git"},
+		{"git::https://github.com/gruntwork-io/repo-name", "git::https://github.com/gruntwork-io/repo-name"},
 		{"https://github.com/gruntwork-io/repo-name//modules/module-name", "git::https://github.com/gruntwork-io/repo-name.git//modules/module-name"},
 		{"ssh://github.com/gruntwork-io/repo-name//modules/module-name", "ssh://github.com/gruntwork-io/repo-name//modules/module-name"},
 		{"https://gitlab.com/catamphetamine/libphonenumber-js", "git::https://gitlab.com/catamphetamine/libphonenumber-js.git"},
 		{"https://bitbucket.org/atlassian/aws-ecr-push-image", "git::https://bitbucket.org/atlassian/aws-ecr-push-image.git"},
+		{"http://bitbucket.org/atlassian/aws-ecr-push-image", "git::https://bitbucket.org/atlassian/aws-ecr-push-image.git"},
 		{"https://s3-eu-west-1.amazonaws.com/modules/vpc.zip", "s3::https://s3-eu-west-1.amazonaws.com/modules/vpc.zip"},
 		{"https://www.googleapis.com/storage/v1/modules/foomodule.zip", "gcs::https://www.googleapis.com/storage/v1/modules/foomodule.zip"},
+		{"https://www.googleapis.com/storage/v1/modules/foomodule.zip", "gcs::https://www.googleapis.com/storage/v1/modules/foomodule.zip"},
+		{"git::https://name@dev.azure.com/name/project-name/_git/repo-name", "git::https://name@dev.azure.com/name/project-name/_git/repo-name"},
 	}
 
 	for i, testCase := range testCases {