# Getting Error authenticating every few runs

**URL:** https://drone.discourse.group/t/getting-error-authenticating-every-few-runs/8608
**Category:** Drone Support
**Created:** [July 10, 2020, 7:27pm UTC](https://drone.discourse.group/t/getting-error-authenticating-every-few-runs/8608 "2020-07-10T19:27:12Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Devvix](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/devvix/32/5780_2.png) [@Devvix](https://drone.discourse.group/u/Devvix)
#### Post date: [July 10, 2020, 7:27pm UTC](https://drone.discourse.group/t/getting-error-authenticating-every-few-runs/8608/1 "2020-07-10T19:27:12Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![ashwilliams1](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/ashwilliams1/32/5549_2.png) [@ashwilliams1](https://drone.discourse.group/u/ashwilliams1)
#### Post date: [July 10, 2020, 7:29pm UTC](https://drone.discourse.group/t/getting-error-authenticating-every-few-runs/8608/2 "2020-07-10T19:29:37Z")

</div>

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>`

---

<div class="post-metadata">

### Author: ![Devvix](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/devvix/32/5780_2.png) [@Devvix](https://drone.discourse.group/u/Devvix)
#### Post date: [July 10, 2020, 7:32pm UTC](https://drone.discourse.group/t/getting-error-authenticating-every-few-runs/8608/3 "2020-07-10T19:32:06Z")

</div>

That’s all it shows I’m afraid. ![image](https://canada1.discourse-cdn.com/flex003/uploads/testdrone/original/2X/d/d9f4d9519ff579377fa2123ba41b4fb074a3aac6.png)  
Any other logs I can provide that will help?

---

<div class="post-metadata">

### Author: ![ashwilliams1](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/ashwilliams1/32/5549_2.png) [@ashwilliams1](https://drone.discourse.group/u/ashwilliams1)
#### Post date: [July 10, 2020, 7:34pm UTC](https://drone.discourse.group/t/getting-error-authenticating-every-few-runs/8608/4 "2020-07-10T19:34:05Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Devvix](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/devvix/32/5780_2.png) [@Devvix](https://drone.discourse.group/u/Devvix)
#### Post date: [July 10, 2020, 7:35pm UTC](https://drone.discourse.group/t/getting-error-authenticating-every-few-runs/8608/5 "2020-07-10T19:35:05Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Devvix](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/devvix/32/5780_2.png) [@Devvix](https://drone.discourse.group/u/Devvix)
#### Post date: [July 10, 2020, 7:55pm UTC](https://drone.discourse.group/t/getting-error-authenticating-every-few-runs/8608/6 "2020-07-10T19:55:13Z")

</div>

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 🙂

---

<div class="post-metadata">

### Author: ![ashwilliams1](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/ashwilliams1/32/5549_2.png) [@ashwilliams1](https://drone.discourse.group/u/ashwilliams1)
#### Post date: [July 10, 2020, 8:17pm UTC](https://drone.discourse.group/t/getting-error-authenticating-every-few-runs/8608/7 "2020-07-10T20:17:00Z")

</div>

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)

---

<div class="post-metadata">

### Author: ![Devvix](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/devvix/32/5780_2.png) [@Devvix](https://drone.discourse.group/u/Devvix)
#### Post date: [July 10, 2020, 8:32pm UTC](https://drone.discourse.group/t/getting-error-authenticating-every-few-runs/8608/8 "2020-07-10T20:32:41Z")

</div>

Alright, I’ll keep looking myself. Thanks anyway 🙂
