소스 검색

Fixed issue in registry.GetRemoteTags

shin- 12 년 전
부모
커밋
72befeef24
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      registry/registry.go

+ 3 - 0
registry/registry.go

@@ -155,6 +155,9 @@ func (r *Registry) GetRemoteTags(registries []string, repository string, token [
 	}
 	for _, host := range registries {
 		endpoint := fmt.Sprintf("%s/v1/repositories/%s/tags", host, repository)
+		if !(strings.HasPrefix(endpoint, "http://") || strings.HasPrefix(endpoint, "https://")) {
+				endpoint = "https://" + endpoint
+			}
 		req, err := r.opaqueRequest("GET", endpoint, nil)
 		if err != nil {
 			return nil, err