We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I disable the tls verification?
I'm getting this error:
tls: failed to verify certificate: x509: certificate signed by unknown authority
The text was updated successfully, but these errors were encountered:
@guilhermelff did you find a solution to this issue yet?
Sorry, something went wrong.
based on this issue within the imported go-gitlab repo, you can use a custom WithHTTPClient ClientOptionFunc (code) to set the SSL options you want.
WithHTTPClient
Im not native to GoLang, but I believe it could look something like this (need to import "net/http" and "crypto/tls")...
func New(logger *log.Logger, gitlabToken string, gitlabBaseURL *url.URL, committerName, committerEmail string, ) (*App, error) { customTransport := &(*http.DefaultTransport.(*http.Transport)) // make shallow copy customTransport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} client := &http.Client{Transport: customTransport} gitlabClient, err := goGitlab.NewClient(gitlabToken, goGitlab.WithBaseURL(gitlabBaseURL.String()), **goGitlab.WithHttpClient(client)**) if err != nil { return nil, fmt.Errorf("create GitLab client: %w", err) } ...
No branches or pull requests
How do I disable the tls verification?
I'm getting this error:
tls: failed to verify certificate: x509: certificate signed by unknown authority
The text was updated successfully, but these errors were encountered: