-
Notifications
You must be signed in to change notification settings - Fork 893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non-standard image refs does not map to expected repositories in config.json #796
Comments
In the debug log it says it is unable to find credentials in the config for the username 'dockergelb', but that is the one I used to log in. Do I have to specify it in the config.json somewhere for watchtower to realize it has to use those credentials? |
It seems to parse the registry incorrent? When checking for the image
Shouldn't the server be something like |
It works when I manually copy my auth token for
|
Can you do a pull using that config outside of watchtower? (I mean without the added |
Yes, it's no problem outside.
The part which parses the server/registry from the image tag is wrong I think (here) It should not work for any of the tags in the format:
Because it just splits at |
The ref should already be normalized at that point, which means that it should start with the hostname etc. |
It should not matter whether it's private or not, the debug log should print your username as the extracted server name either way when trying to look for credentials for the image tag |
Yeah, I can confirm that it doesn't work with private dockerhub repos. Not sure why it's not using the normalized image ref.
Maybe @simskij knows why the the common repo names aren't prepended when resolving credentials...? |
Currently, as @piksel mentioned, you either need to use the |
Hey @simskij, just to clarity as I'm facing the same issue. This should work:
|
Hey @lsaadeh, just to clarify, do you still have the issue, or are you saying that the above is what worked for you? 😁 It looks correct afaict. |
Yes.. I'm still having the issue. =( For whatever reason, I get a 401 error msg:
Though when I run
|
Yeah, it does correctly use you credentials, but they are not authorized to pull from that repo for some reason: Since you have modified the log to remove sensitive information, it's kind of hard to tell what is typos and what might actually be a problem, but it looks like there is a Maybe there are several entries in |
Sorry for messing that up ><! I've updated my last post with the original details.. they're not that sensitive anyway... There's only 1 entry in my config file, I can also pull the container on my machine manually |
I am having absolutely the same issue :(
|
@lsaadeh Please open up a discussion if you want any further help with your setup. This issue should be limited to watchtower not resolving the image names to |
Thank you for the reply! However I do have all my images named as well as containers. So it is really strange...
|
@staser12 The container that had such an image was called |
ok, thanks a lot for your help! I will try to figure out where does this container come from. I will create a new discussion in case I cannot figure this out. |
I'm having (kind of) the same issue with pulling images from docker hub. After fiddling around with the
This is very confusing especially because the watchtower documentation says I'm supposed to use This is with watchtower 1.3.0. |
I made some experiments to check the behaviour of watchtower in regards to the config.json credentials. First I started three containers with the following images (the same image, but with different repository hosts):
Then I ran
None of the images could be updated, but the "most promising" one found the credentials, but claimed that the user was an empty string. Looking in my {
"auths": {
"https://index.docker.io/v1/": {}
},
"credsStore": "desktop.exe",
"experimental": "enabled"
} It did add the entry, but the actual credentials was stored in the credential helper (that watchtower has no access to). Upon running watchtower again with the new config.json:
It could now authenticate and pull the latest image.
So, in conclusion: |
Actually what's in the documentation works for me, I've clarified it here: #1132 (comment) |
🎉 |
Describe the bug
I am unable to pull private repositories with mapped
config.json
To Reproduce
I have mapped the
config.json
in/root/.docker
, to/config
in the watchtower container, but it is still failing to pull private repositories, even though the same repos are accessible on the host system.This is the
docker-compose
file I use, (.env just contains the notification variables):Environment
The text was updated successfully, but these errors were encountered: