added skip vetify of server cert
This commit is contained in:
@@ -47,7 +47,7 @@ func (cli *Client) ImageInfo(ctx context.Context, imagepath string) (*ImageDescr
|
||||
}
|
||||
|
||||
if username != "" && password != "" {
|
||||
defaultTransport := &roundTripper{}
|
||||
defaultTransport := NewRoundTripper(cli.skipTLSVerify)
|
||||
scopes := []string{repo.Scope(transport.PullScope)}
|
||||
|
||||
regName := repo.RegistryStr()
|
||||
@@ -65,7 +65,7 @@ func (cli *Client) ImageInfo(ctx context.Context, imagepath string) (*ImageDescr
|
||||
}
|
||||
options = append(options, crane.WithTransport(authTransport))
|
||||
} else {
|
||||
transport := &roundTripper{}
|
||||
transport := NewRoundTripper(cli.skipTLSVerify)
|
||||
options = append(options, crane.WithTransport(transport))
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ func (cli *Client) ImageInfo(ctx context.Context, imagepath string) (*ImageDescr
|
||||
remoteOptions = append(remoteOptions, remote.WithContext(ctx))
|
||||
|
||||
if username != "" && password != "" {
|
||||
defaultTransport := &roundTripper{}
|
||||
defaultTransport := NewRoundTripper(cli.skipTLSVerify)
|
||||
scopes := []string{repo.Scope(transport.PullScope)}
|
||||
|
||||
regName := repo.RegistryStr()
|
||||
@@ -110,7 +110,7 @@ func (cli *Client) ImageInfo(ctx context.Context, imagepath string) (*ImageDescr
|
||||
}
|
||||
remoteOptions = append(remoteOptions, remote.WithTransport(authTransport))
|
||||
} else {
|
||||
transport := &roundTripper{}
|
||||
transport := NewRoundTripper(cli.skipTLSVerify)
|
||||
options = append(options, crane.WithTransport(transport))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user