You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2023/03/01 13:32:45 UTC

[incubator-devlake] branch main updated: fix: gitextractor can not clone bitbucket private repos (#4559)

This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 2aa427915 fix: gitextractor can not clone bitbucket private repos (#4559)
2aa427915 is described below

commit 2aa4279155aca46b970708a0f5867805c25d132f
Author: mindlesscloud <li...@merico.dev>
AuthorDate: Wed Mar 1 21:32:40 2023 +0800

    fix: gitextractor can not clone bitbucket private repos (#4559)
    
    * fix: gitextractor cloning bitbucket private repos
    
    * fix: unit test
---
 backend/plugins/bitbucket/api/blueprint_V200_test.go | 2 +-
 backend/plugins/bitbucket/api/blueprint_v200.go      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/backend/plugins/bitbucket/api/blueprint_V200_test.go b/backend/plugins/bitbucket/api/blueprint_V200_test.go
index 95064186d..9dfeb7668 100644
--- a/backend/plugins/bitbucket/api/blueprint_V200_test.go
+++ b/backend/plugins/bitbucket/api/blueprint_V200_test.go
@@ -90,7 +90,7 @@ func TestMakeDataSourcePipelinePlanV200(t *testing.T) {
 				Options: map[string]interface{}{
 					"proxy":  "",
 					"repoId": "bitbucket:BitbucketRepo:1:likyh/likyhphp",
-					"url":    "https://git:Password@this_is_cloneUrl",
+					"url":    "https://Username:Password@this_is_cloneUrl",
 				},
 			},
 		},
diff --git a/backend/plugins/bitbucket/api/blueprint_v200.go b/backend/plugins/bitbucket/api/blueprint_v200.go
index cb1c74cbd..95c34922f 100644
--- a/backend/plugins/bitbucket/api/blueprint_v200.go
+++ b/backend/plugins/bitbucket/api/blueprint_v200.go
@@ -134,7 +134,7 @@ func makeDataSourcePipelinePlanV200(
 			if err != nil {
 				return nil, err
 			}
-			cloneUrl.User = url.UserPassword("git", connection.Password)
+			cloneUrl.User = url.UserPassword(connection.Username, connection.Password)
 			stage = append(stage, &plugin.PipelineTask{
 				Plugin: "gitextractor",
 				Options: map[string]interface{}{