If you’re following my blog, you probably read my articles on getting started with Tanzu Application Platform (here and here). Today I have a short article on an issue I faced recently while trying to run the Tanzu Live Update feature in a new Tanzu Application Platform (TAP): Tilt not being able to upload the source code to the registry.
Error: Writing ‘<registry-url>/nl-development/nl-tanzu-java-web-app:latest’: Writing image: HEAD https://<registry-url>/v2/nl-development/nl-tanzu-java-web-app/blobs/sha256:faa2bee57982b8c099d17a2779004d4de73d1c69f0c47ef3949c02ccf34f8b1b: unexpected status code 401 Unauthorized (HEAD responses have no body, use GET for details)
I haven’t seen this error in my previous deployment, so I was wondering a bit what is going on here. The secret for this registry was configured succesfully on the Kubernetes environment, and there were no problems building containers in this environment. Nevertheless Tilt (icw Visual Studio code) was not able to upload the source code to the registry.
After some troubleshooting with my colleage Robert Jensen we figured out what was going on. The credentials that are used for the registry to store your source code, are not coming from the Kubernetes cluster. You have to logon to your registry on your laptop/PC using docker login:
docker login <registry-url>
Now the Tanzu Live Update feature will run without any issues and you should be fine.
More information on the Tanzu Live Update feature is available here and here.
I hope this helps.