Hello and thank you for the tool.
I think I've found a bug in the gitlab backup implementation. Seems like the gitlab Go module uses its own HTTP client, so setting the global HTTP transport here:
|
if *enableInsecure { |
|
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true} |
|
} |
does not affect subsequent
config.setDefaults -> gitlab.NewClient call:
|
client, err := gitlab.NewClient(g.AccessToken, gitlab.WithBaseURL(g.URL)) |
which causes the error in the case of a self-issued certificate:
2026/08/19 12:22:27 Failed to verify connection to job [git]: Get "https://git/api/v4/user": tls: failed to verify certificate: x509: certificate signed by unknown authority
A quick, dirty hack, however, solves this problem:
client, err := gitlab.NewClient(g.AccessToken, gitlab.WithBaseURL(g.URL), gitlab.WithHTTPClient(&http.Client{Transport: http.DefaultTransport}))
I'm not sure if it applies to the GithubConfig implementation. Hope this helps fix the issue.
Hello and thank you for the tool.
I think I've found a bug in the gitlab backup implementation. Seems like the gitlab Go module uses its own HTTP client, so setting the global HTTP transport here:
git-backup/cmd/git-backup/main.go
Lines 36 to 38 in 6fee336
does not affect subsequent
config.setDefaults -> gitlab.NewClientcall:git-backup/gitlab.go
Line 53 in 6fee336
which causes the error in the case of a self-issued certificate:
A quick, dirty hack, however, solves this problem:
I'm not sure if it applies to the GithubConfig implementation. Hope this helps fix the issue.