concourse / registry-image-resource

a resource for images in a Docker registry
Apache License 2.0
89 stars 107 forks source link

insecure not working for https registry #304

Closed wlwwu closed 2 years ago

wlwwu commented 2 years ago

err information:

ERRO[0004] pushing image failed: initialize transport: GET http://xxxxxx/v2/: unexpected status code 400 Bad Request:

400 The plain HTTP request was sent to HTTPS port

400 Bad Request

The plain HTTP request was sent to HTTPS port

nginx/1.19.1

/html>

pipeline: resource_types:

resources:

Where we will push the image

Just want to know how to set the insecure flag here

chris-aeviator commented 2 years ago

this is to be expected, a HTTPS connection can not be used with HTTP

cherwin commented 2 years ago

Try something like below

resource_types:
  - name: registry-image-insecure
    type: docker-image
    source:
      repository: cherwin/registry-image-resource
      tag: 0.1.0

resources:
- name: docker-registry
  type: registry-image-insecure
  icon: docker
  source:
    repository: my.private.insecure.registry:5000/foo
    insecure: true
xtremerui commented 2 years ago

Closing as solution provided.