containerd / containerd/nerdctl

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

Open
#3,046 5 comments 0 reactions 0 assignees View on GitHub
area/login bug
Dominant language
Go
Stars
10.4k
Forks
826
Avg merge
1d 23h
Merged PRs (30d)
44

Description

### 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_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.