Unable to deploy to Digital Ocean - 401 Unauthorized #1199
Replies: 7 comments
-
I wanted to answer my own question here (sorta) in case it's helpful to someone else. What I've learned is that DO container registry is a pain in the ass. I think almost all of my initial frustration with Kamal was due to issues with |
Beta Was this translation helpful? Give feedback.
-
I am having this same apparent issue with DigitalOcean registry. When I attempt a
When I do This was all working so nicely the other day! What I know so far: It does not matter if I use kamal 2.3.0 or 2.4.0, I still get the same result. @codepilotsf did you find some kind of cache file or other thing relating to DO API/doctl that helps here? I would prefer not to switch registries. |
Beta Was this translation helpful? Give feedback.
-
@codepilotsf Kamal doesn't use |
Beta Was this translation helpful? Give feedback.
-
I've got a few apps on kamal, all setup basically the same with DigitalOcean, just different accounts. I have them setup like the example you link to @nickhammond and its been working fine for months. When I moved to a new laptop and set up all the This is the error
I am able to use the exact same credentials that are not working in kamal to do a manual I think there is something weird about the digitalocean registry here. I remember when I was initially setting this app up I had a similar issue and just fiddled and retried and it eventually worked. I wasn't sure what acually ended up fixing it. I'll update back here if I get a solution. |
Beta Was this translation helpful? Give feedback.
-
OK, I have made progress but I still do not understand this issue. I am sometimes getting an error when pushing registry.digitalocean.com that looks like this:
I can successfully Major clue: I am using OSX and Docker Desktop (by chance were you too @codepilotsf ?). When I change kamal config so it uses remote linux builder, everything works. I change nothing else, just add the I believe there is some funny business around the "credStore" config feature in docker for OSX. Unfortunately, it seems to be very very difficult if not impossible to disable that feature now in the newest versions of docker desktop, so I went way down the rabbit hole of trying to figure how to disable it and ultimately it was never confident that it was actually disabled. I am not a super docker expert nor do I really want to be one. Anyways.... my workaround is to just use a remote linux builder and everything works perfectly. I am moving on... I really tried to get to the bottom of this. If there are any Docker OSX experts out there, this could use a look (maybe @nickhammond ?). I don't think this is a kamal issue at this point but my confidence in that is low. I love Kamal, but man this docker issue was a major PITA! |
Beta Was this translation helpful? Give feedback.
-
@rschultheis Yes. MacOS with Docker Desktop over here. But here's an important point: When I switched away from DO's registry and tried using DockerHub, then GitLab's built-in registry, then later using Gitea's built-in registry, all three of those non-DO options worked flawlessly even with MacOS Docker Desktop. |
Beta Was this translation helpful? Give feedback.
-
I think the difference with DigitalOcean is that every private repo uses the same url: I have multiple kamal projects hosted on DigitalOcean, and they use distinct DigitalOcean registries. Somewhere, something is caching login credentials for My best guess is the credStore part of Docker Desktop, but I just can't pin down the exact place this cacheing is happening. |
Beta Was this translation helpful? Give feedback.
-
For some reason, after authenticating with
doctl auth init --context myapp
I'm hitting this error:The really weird thing is that the URL in the error seems to show old connection info "codepilotsf/testme" in addition to the new one. This is all such a black box to me. I thought Kamal was supposed to simplify deployment. :-)
Any clues?
Beta Was this translation helpful? Give feedback.
All reactions