Getting Error authenticating every few runs

I need to retry a build 3 or 4 times before it doesn’t give this error:

+ /usr/local/bin/dockerd --data-root /var/lib/docker --host=unix:///var/run/docker.sock
2 time="2020-07-10T19:20:17Z" level=fatal msg="Error authenticating: exit status 1"

I’ve added all the required arguments to the yml file I believe since it works after a few tries. It’s a private registry that’s always online and the registry doesn’t show any problems.

Here’s my yml file for the build part:

kind: pipeline
name: public

steps:
  - name: build
    image: plugins/docker
    environment:
      DISCORD_API_KEY:
        from_secret: DISCORD_API_KEY
    settings:
      repo: private.myregistry.com/mypackage
      registry: private.myregistry.com
      tags: [ latest ]
      username:
        from_secret: username
      password:
        from_secret: password
      build_args_from_env:
        - DISCORD_API_KEY
    debug: true

Thanks in advance!

can you please provide the full logs (from the UI) for this pipeline step?

EDIT: also can you provide the following?

  1. the results of drone secret ls <repo>
  2. drone secret info <repo> username
  3. drone secret info <repo> password
  4. the result of drone build info <repo> <build>

That’s all it shows I’m afraid. image
Any other logs I can provide that will help?

basically you are getting an Error authenticating which would imply a problem with your username or password.

Yeah I assumed the same, but it works after a few attempts without changing anything. Lemme get all the data you asked in your edit.

Hi, sorry it took so long, hadn’t installed the cli before

the results of drone secret ls <repo>:

DISCORD_API_KEY
Pull Request Read:  false
Pull Request Write: false

SSHKEY
Pull Request Read:  false
Pull Request Write: false

host
Pull Request Read:  false
Pull Request Write: false

password
Pull Request Read:  false
Pull Request Write: false

username
Pull Request Read:  false
Pull Request Write: false

drone secret info <repo> username:

json: cannot unmarshal array into Go value of type drone.Secret

drone secret info password

json: cannot unmarshal array into Go value of type drone.Secret

the result of drone build info <repo> <build>

Number: 37
Status: failure
Event: push
Commit: aff57026e46e2f5b658ea4d9d009ad20ff4cdb88
Branch: master
Ref: refs/heads/master
Author:  <removeemail@gmail.com>
Message: linter

Edit: Forgot to mention but I really appreciate you trying to help :slight_smile:

hmm, I don’t see anything. The most common use case for these sorts of errors are:

  1. invalid username or password
  2. copy / paste error when creating a secret
  3. newline or whitespace accidentally added when creating secret
  4. secret not available for pull request (not applicable in this case, since the build is a push)
  5. yaml syntax error (I do not see anything here)
  6. docker password is a temporary password and expired (common with ecr, gcr, etc which generate temporary credentials)

Alright, I’ll keep looking myself. Thanks anyway :slight_smile: