use the http transport on the registry to support -k (#77)

This commit is contained in:
Casey Lee 2018-03-06 08:53:19 -08:00 committed by Jess Frazelle
parent 64124a70bf
commit 17625873c8

View file

@ -118,7 +118,12 @@ func isTokenDemand(resp *http.Response) (*authService, error) {
func (r *Registry) Token(url string) (string, error) {
r.Logf("registry.token url=%s", url)
resp, err := http.Get(url)
req, err := http.NewRequest("GET", url, nil)
if err != nil {
return "", err
}
resp, err := r.Client.Do(req)
if err != nil {
return "", err
}