containerd / containerd/nerdctl

`nerdctl login` should warn about passing along an explicit scheme

Open
#3,052 3 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

While `pull` and `push` do not allow explicit schemes (as image identifiers do not), both docker and nerdctl `login` DO allow it, albeit ignoring them entirely.

Our suggestion is to:
- warn the user that this syntax is only supported as a convenience and that the scheme is ignored (which docker should do too)

This will impact #3046 - which I believe still matters as there should be a way to talk TLS even with localhost.

### Steps to reproduce the issue

```
dmp@lima-dock:/Users/dmp/Projects/go/nerdctl$ sudo nerdctl login http://192.168.5.15
```

### Describe the results you received and expected

```
ERRO[0000] failed to call tryLoginWithRegHost error="failed to call rh.Client.Do: Get \"https://192.168.5.15/v2/\": dial tcp 192.168.5.15:443: connect: connection refused" i=0
```

### What version of nerdctl are you using?

1.7.6

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