I'm in the process of integrating GitLab's CI/CD and Container Registry with CapRover and I was experiencing some issues with authentication.

When I was triggering a build from the CapRover dashboard the build would fail with the following error in the logs:

Deploy failed! Error: (HTTP code 404) unexpected - pull access denied for registry.gitlab.com/goliatone/owerwatch, repository does not exist or may require ‘docker login’

If I tried locally I would see a similar error:

⠧ Building your source code... An explicit image name was provided (registry.gitlab.com/goliatone/owerwatch:v0.0.13). Therefore, no build process is needed. Pulling this image: registry.gitlab.com/goliatone/owerwatch:v0.0.13 This process might take a few minutes. Build has failed!

Deploy failed! Error: (HTTP code 500) server error - Get https://registry.gitlab.com/v2/goliatone/owerwatch/manifests/v0.0.13: unauthorized: HTTP Basic: Access denied

Something bad happened. Cannot deploy overwatch at https://admin.example.com.

The process was complicated because I was changing Deploy Tokens and Deploy Keys due to a different error- make sure your keys are in the right format.

When I finally figured out the issue I realized the errors threw me off. Because the require ‘docker login’ or Basic: Access denied I was assuming it was an error related to authentication.

Turns out I made a typo in the repository name. Fixing the typo had it all working.