Skip to content

Even when explicitly passing https, registry requests to localhost are downgraded to http  #3046

@apostasie

Description

@apostasie

Description

nerdctl login https://127.0.0.1:5000 will always be downgraded to http://127.0.0.1:5000

It seems to be because of the faulty logic in remotes/docker/config/hosts.go that apparently considers "the scheme is ambiguous" as the port is non-standard and the host is localhost.

Whether they fixed it for 2.0 is unclear to me at this point.

Steps to reproduce the issue

  1. nerdctl login https://127.0.0.1:5000

Describe the results you received and expected

Seeing: request downgraded to http://127.0.0.1:5000

Should see: not downgraded, the scheme is explicit

What version of nerdctl are you using?

1.7.6 / main

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/loginauthentification/ loginbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions