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 to make InsecureSkipVerify==true
The text was updated successfully, but these errors were encountered:
same issue
Sorry, something went wrong.
func NewRESTClientForHost(u, username, password string, opts *config.Options) (*RESTClient, error) { if !strings.HasSuffix(u, v2URLSuffix) { u += v2URLSuffix } harborURL, err := url.Parse(u) if err != nil { return nil, err } //构建客户端时, InsecureSkipVerify==true ,临时使用
authInfo := runtimeclient.BasicAuth(username, password) if harborURL.Scheme == "https" { var optsTLS runtimeclient.TLSClientOptions optsTLS.InsecureSkipVerify = true client, err := runtimeclient.TLSClient(optsTLS) if err != nil { return nil, err } v2SwaggerClient := v2client.New(runtimeclient.NewWithClient(harborURL.Host, harborURL.Path, []string{harborURL.Scheme}, client), strfmt.Default) return NewRESTClient(v2SwaggerClient, opts, authInfo), nil } else { v2SwaggerClient := v2client.New(runtimeclient.New(harborURL.Host, harborURL.Path, []string{harborURL.Scheme}), strfmt.Default) return NewRESTClient(v2SwaggerClient, opts, authInfo), nil }
}
@wdt1988520 How to use it? Specifically, modify the source file of that version Looking forward for your response, thank you
No branches or pull requests
how to make InsecureSkipVerify==true
The text was updated successfully, but these errors were encountered: