diff --git a/registry/tokentransport.go b/registry/tokentransport.go index 6af11d1a2..faf14490b 100644 --- a/registry/tokentransport.go +++ b/registry/tokentransport.go @@ -113,7 +113,9 @@ type authService struct { func (a *authService) Request(username, password string) (*http.Request, error) { q := a.Realm.Query() - q.Set("service", a.Service) + if len(a.Service) > 0 { + q.Set("service", a.Service) + } for _, s := range a.Scope { q.Set("scope", s) }