asosso
(Andrea S)
June 24, 2019, 5:02pm
1
Hi,
I’m trying to build and push an image to our internal docker registry using drone 1.2.1
Credentials are stored on k8s using drone/drone-kubernetes-secrets
.
I received this error: level=fatal msg="Error authenticating: exit status 1"
Looking in running container I’ve found these environment variables:
export PLUGIN_USERNAME='my.user
'
export PLUGIN_PASSWORD='MY_SUPERSECRET_PASSWORD
'
If I set only the password from from UI, the environment variables are:
export PLUGIN_USERNAME='my.user
'
export PLUGIN_PASSWORD='MY_SUPERSECRET_PASSWORD'
And the build works.
The secret is stored without \n
on k8s, es. TVlfU1VQRVJTRUNSRVRfUEFTU1dPUkQK
Does anyone have the same issue?
Did you provide registry in your step settings?
steps:
- name: docker
image: plugins/docker
settings:
registry: %yourregistry%
repo: %yourrepos with registry%
target: debug
username: kevinbacon
password: pa55word
1 Like
asosso
(Andrea S)
June 25, 2019, 4:24pm
3
Yes, registry authentication works using PLUGIN_PASSWORD=‘MY_SUPERSECRET_PASSWORD’
steps:
- name: docker
image: plugins/docker
settings:
registry: my.registry.url.internal
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: my.registry.url.internal/dev/image
---
kind: secret
name: docker_username
get:
path: docker
name: username
---
kind: secret
name: docker_password
get:
path: docker
name: password