Cannot install apps from docker-registry because authentication fails
-
Few years after the original bug got fixed, I am encountering the same error for my selfhosted private registry:
Docker Error - Unable to pull image mydomain.com/myusername/myapp:1.0.0 Please check the network or if the image needs authentication. statusCode 500
In the logs are 10 not successful pull attempts visible.
The Docker registry is hosted on the same Cloudron server, it is Docker Registry App from official App Store.
In the settings if my Cloudron instance, I configured a Private Docker Registry with the same Credentials I used to successfully push the Docker build from local. I changed from Docker to Other just to be sure, with the same credentials.
After building the build, I can successfullypush it with the very same credentials to the private Docker Hub.Is there any way how to come closer to the probable authentication error?
@nottheend have created a new topic since it is most likely not this bug:
https://forum.cloudron.io/topic/12216/docker-error-unable-to-pull-image-on-same-instance -
Hi, I have encountered this bug once more, with the following user agents:
- Podman:
libpod/<version>
- Skopeo:
skopeo/<version>
@girish Would it be possible to add those as well? That would be much appreciated.
In
src/proxyAuth.js
// someday this can be more sophisticated and check for a real browser function isBrowser(req) { const userAgent = req.get('user-agent'); if (!userAgent) return false; // https://github.com/docker/engine/blob/master/dockerversion/useragent.go#L18 return !userAgent.toLowerCase().includes('docker') && !userAgent.toLowerCase().includes('container') && !userAgent.toLowerCase().includes('libpod') && !userAgent.toLowerCase().includes('skopeo'); }
In
src/nginxconfig.ejs
location @proxy-auth-login { if ($http_user_agent ~* "docker") { return 401; } if ($http_user_agent ~* "container") { return 401; } if ($http_user_agent ~* "libpod") { return 401; } if ($http_user_agent ~* "skopeo") { return 401; } return 302 /login?redirect=$request_uri; }
- Podman:
-
Hi, I have encountered this bug once more, with the following user agents:
- Podman:
libpod/<version>
- Skopeo:
skopeo/<version>
@girish Would it be possible to add those as well? That would be much appreciated.
In
src/proxyAuth.js
// someday this can be more sophisticated and check for a real browser function isBrowser(req) { const userAgent = req.get('user-agent'); if (!userAgent) return false; // https://github.com/docker/engine/blob/master/dockerversion/useragent.go#L18 return !userAgent.toLowerCase().includes('docker') && !userAgent.toLowerCase().includes('container') && !userAgent.toLowerCase().includes('libpod') && !userAgent.toLowerCase().includes('skopeo'); }
In
src/nginxconfig.ejs
location @proxy-auth-login { if ($http_user_agent ~* "docker") { return 401; } if ($http_user_agent ~* "container") { return 401; } if ($http_user_agent ~* "libpod") { return 401; } if ($http_user_agent ~* "skopeo") { return 401; } return 302 /login?redirect=$request_uri; }
- Podman: