From a3ac0d68109e0275bb884ec312adbff1dda112a9 Mon Sep 17 00:00:00 2001 From: Saleh Khazaei Date: Wed, 31 Jul 2024 14:47:44 +0400 Subject: [PATCH] fix: Fixes git --- services/migrator/job/git.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/services/migrator/job/git.go b/services/migrator/job/git.go index dbb6317c3..136f1d33a 100644 --- a/services/migrator/job/git.go +++ b/services/migrator/job/git.go @@ -3,7 +3,6 @@ package job import ( "encoding/json" "github.com/go-git/go-git/v5" - githttp "github.com/go-git/go-git/v5/plumbing/transport/http" "github.com/kaytu-io/kaytu-engine/pkg/metadata/client" "github.com/kaytu-io/kaytu-engine/pkg/metadata/models" "github.com/kaytu-io/kaytu-engine/services/migrator/config" @@ -35,13 +34,13 @@ func GitClone(conf config.MigratorConfig, logger *zap.Logger) (string, error) { refs := make([]string, 0, 2) - gitAuth := githttp.BasicAuth{ - Username: "abc123", - Password: gitConfig.githubToken, - } + //gitAuth := githttp.BasicAuth{ + // Username: "abc123", + // Password: gitConfig.githubToken, + //} os.RemoveAll(config.ConfigzGitPath) res, err := git.PlainClone(config.ConfigzGitPath, false, &git.CloneOptions{ - Auth: &gitAuth, + //Auth: &gitAuth, URL: gitConfig.AnalyticsGitURL, Progress: os.Stdout, }) @@ -58,7 +57,7 @@ func GitClone(conf config.MigratorConfig, logger *zap.Logger) (string, error) { os.RemoveAll(config.ControlEnrichmentGitPath) res, err = git.PlainClone(config.ControlEnrichmentGitPath, false, &git.CloneOptions{ - Auth: &gitAuth, + //Auth: &gitAuth, URL: gitConfig.ControlEnrichmentGitURL, Progress: os.Stdout, })