# Setting up mTLS, running docker image errors with "no basic auth credentials"

**URL:** <https://hub.mender.io/t/setting-up-mtls-running-docker-image-errors-with-no-basic-auth-credentials/5076>\
**Category:** General Discussions\
**Created:** [June 30, 2022, 10:00pm UTC](https://hub.mender.io/t/setting-up-mtls-running-docker-image-errors-with-no-basic-auth-credentials/5076 "2022-06-30T22:00:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MattS](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@MattS](https://hub.mender.io/u/MattS)\
**Post date:** [June 30, 2022, 10:00pm UTC](https://hub.mender.io/t/setting-up-mtls-running-docker-image-errors-with-no-basic-auth-credentials/5076/1 "2022-06-30T22:00:41Z")

</div>

I am following the official documentation here, with Mender HOSTED

- [Mutual TLS authentication | Mender documentation](https://docs.mender.io/development/server-integration/mutual-tls-authentication)

And have used all of the default values provided in the code snippets as I just want to get the image running locally, then I will look to configure it with the actual certificates.

I have a Mender Enterprise Trial, and my account is configured as the Administrator, and I am using the Mender Hosted Service.

This is the step that fails:

```auto
docker run \
  -p 443:8080 \
  -e MTLS_MENDER_USER="$MTLS_MENDER_USER" \
  -e MTLS_MENDER_PASS="$MTLS_MENDER_PASS" \
  -e MTLS_MENDER_BACKEND=$MTLS_MENDER_BACKEND \
  -e MTLS_DEBUG_LOG=true \
  -v $(pwd)/server-cert.pem:/etc/mtls/certs/server/server.crt \
  -v $(pwd)/server-private.key:/etc/mtls/certs/server/server.key \
  -v $(pwd)/ca-cert.pem:/etc/mtls/certs/tenant-ca/tenant.ca.pem \
  registry.mender.io/mendersoftware/mtls-ambassador:mender-master

```

The error is:

```auto
Unable to find image 'registry.mender.io/mendersoftware/mtls-ambassador:mender-master' locally
docker: Error response from daemon: Head "https://registry.mender.io/v2/mendersoftware/mtls-ambassador/manifests/mender-master": no basic auth credentials.
See 'docker run --help'.

```

I have reviewed the suggestions in the following threads:

- [Understanding mutual TLS - General Discussions - Mender Hub](https://hub.mender.io/t/understanding-mutual-tls/3988)
- [Mutual TLS with mender - Get Started - Mender Hub](https://hub.mender.io/t/mutual-tls-with-mender/3263)
- [Issue with Mender Client Certificate/Mutual TLS tutorial or setup - General Discussions - Mender Hub](https://hub.mender.io/t/issue-with-mender-client-certificate-mutual-tls-tutorial-or-setup/2750)

Running `docker login registry.mender.io` and entering my admin credentials returns the following error:

```auto
Error response from daemon: login attempt to https://registry.mender.io/v2/ failed with status: 401 Unauthorized

```

In one of the threads above it [mentions](https://hub.mender.io/t/issue-with-mender-client-certificate-mutual-tls-tutorial-or-setup/2750/2) having a separate account for the mtls authorization, but doesn’t provide any further details and I cannot see anything in the Mender portal to allow registry access.

Is someone able to provide guidance please.
