skip to Main Content
$ docker login -u uploader -p ****** http://10.11.20.186:8082              [14:13:41]
Error: credentials key has https[s]:// prefix

$ docker -v                                                                  [14:28:20]
podman version 3.4.1-dev

$ cat /etc/os-release                                                        [14:28:59]
NAME="CentOS Stream"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Stream 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"

sheng@B-Product-U-WEB01 /etc/containers/registries.conf.d
$ cat 003-nexus.conf                                                         [14:45:28]
[[registry]]
prefix = "10.11.20.186:8082"
location = "10.11.20.186:8082"
insecure = true

I want to log in to my nexus repository manager.
However, when I attempt to do this I get the error.

Error: credentials key has https[s]:// prefix

3

Answers


  1. Chosen as BEST ANSWER

    dnf downgrade podman-docker -y

    sheng@B-Product-U-WEB01 /etc/containers/registries.conf.d
    $ docker -v                                                                  [17:27:36]
    podman version 3.3.0-dev
    
    sheng@B-Product-U-WEB01 /etc/containers/registries.conf.d
    $ docker login -u uploader -p ****** https://10.11.20.186:8082             [17:27:38]
    Login Succeeded!
    

    it's work


  2. docker login -u uploader -p 1qaz2wsx 10.11.20.186:8082
    

    This should work without a downgrade. Just remove ‘https://’.

    Login or Signup to reply.
  3. My Jenkins requires https://, without it, it fails with

    java.net.MalformedURLException: no protocol: quay.io
        at java.net.URL.<init>(URL.java:611)
        at java.net.URL.<init>(URL.java:508)
        at java.net.URL.<init>(URL.java:457)
        at org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint.getEffectiveUrl(DockerRegistryEndpoint.java:145)
        at org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint.newKeyMaterialFactory(DockerRegistryEndpoint.java:300)
        at org.jenkinsci.plugins.docker.workflow.RegistryEndpointStep$Execution2.newKeyMaterialFactory(RegistryEndpointStep.java:95)
        at org.jenkinsci.plugins.docker.workflow.AbstractEndpointStepExecution2.doStart(AbstractEndpointStepExecution2.java:52)
        at org.jenkinsci.plugins.workflow.steps.GeneralNonBlockingStepExecution.lambda$run$0(GeneralNonBlockingStepExecution.java:77)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
    

    The solution turned out to be a system upgrade to the latest version of the RHEL 8.6 packages through dnf upgrade. Now I have

    # docker --version
    podman version 4.0.2
    

    which allows me to use the https:// prefix without complaints.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search