Skip to content

Commit 47bd089

Browse files
committed
fix(configuration): enable InsecureSkipTLS for Git operations to support self-signed certificates
1 parent c27b723 commit 47bd089

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sqle/api/controller/v1/configuration.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,8 @@ func ListGitBranches(ctx context.Context, url, username, password string) ([]str
450450

451451
// 获取远程引用(包括分支和标签)
452452
refs, err := remote.List(&git.ListOptions{
453-
Auth: auth,
453+
Auth: auth,
454+
InsecureSkipTLS: true, // 跳过 SSL 证书验证,支持自签名证书
454455
})
455456
if err != nil {
456457
return nil, err
@@ -477,7 +478,8 @@ func CloneGitRepository(ctx context.Context, url, username, password, branch str
477478
}
478479

479480
cloneOpts := &git.CloneOptions{
480-
URL: url,
481+
URL: url,
482+
InsecureSkipTLS: true, // 跳过 SSL 证书验证,支持自签名证书
481483
}
482484
if branch != "" {
483485
cloneOpts.ReferenceName = plumbing.ReferenceName(branch)

0 commit comments

Comments
 (0)