Error while trying to push images to local registry

Hello,
Docker is installed in a network protected by an HTTP proxy for internet security, and we managed to make docker download images from Docker hub, and everything is ok till now.
As far as we created a second node, in a vision to configure docker swarm, we created a local registry in the first node.
But, when i tag an image with IP:PORT/IMAGE-NAME, and make docker push IP:PORT/IMAGE-NAME, to registry, i get errors related to proxy settings like following (while it’s a simple POC in the same LAN and does not need any kind of proxy):

The push refers to repository [10.55.250.10:5000/hello-world]
e07ee1baac5f: Preparing
error parsing HTTP 403 response body: invalid character '<' looking for beginning of value: "<!-- IE friendly error message walkround.        \n     if error message from server is less than   \n     512 bytes IE v5+ will use its own error     \n     message instead of the one returned by      \n     server.                                 --> \n                                                 \n                                                 \n                                                 \n                                                 \n                                                 \n                                                 \n<!DOCTYPE html>\n<html lang=\"en\">\n    <head>\n        <meta charset=\"UTF-8\">\n        <meta http-equiv=\"X-UA-Compatible\" content=\"IE=8; IE=EDGE\">\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n        <link href=\"https://fonts.googleapis.com/css?family=Roboto&display=swap\" rel=\"stylesheet\">\n        <style type=\"text/css\">\n            body {\n                height: 100%;\n                font-family: Roboto, Helvetica, Arial, sans-serif;\n                color: #6a6a6a;\n                margin: 0;\n                display: flex;\n                align-items: center;\n                justify-content: center;\n            }\n            input[type=date], input[type=email], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=time], input[type=url], select, textarea {\n                color: #262626;\n                vertical-align: baseline;\n                margin: .2em;\n                border-style: solid;\n                border-width: 1px;\n                border-color: #a9a9a9;\n                background-color: #fff;\n                box-sizing: border-box;\n                padding: 2px .5em;\n                appearance: none;\n                border-radius: 0;\n            }\n            input:focus {\n                border-color: #646464;\n                box-shadow: 0 0 1px 0 #a2a2a2;\n                outline: 0;\n            }\n            button {\n                padding: .5em 1em;\n                border: 1px solid;\n                border-radius: 3px;\n                min-width: 6em;\n                font-weight: 400;\n                font-size: .8em;\n                cursor: pointer;\n            }\n            button.primary {\n                color: #fff;\n                background-color: rgb(47, 113, 178);\n                border-color: rgb(34, 103, 173);\n            }\n            .message-container {\n                height: 500px;\n                width: 600px;\n                padding: 0;\n                margin: 10px;\n            }\n            .logo {\n                background: url(https://globalurl.fortinet.net:8010/XX/YY/ZZ/CI/MGPGHGPGPFGHDDPFGGHGFHBGCHEGPFBGAHAH) no-repeat left center;\n                height: 267px;\n                object-fit: contain;\n            }\n            table {\n                background-color: #fff;\n                border-spacing: 0;\n                margin: 1em;\n            }\n            table > tbody > tr > td:first-of-type:not([colspan]) {\n                white-space: nowrap;\n                color: rgba(0,0,0,.5);\n            }\n            table > tbody > tr > td:first-of-type {\n                vertical-align: top;\n            }\n            table > tbody > tr > td {\n                padding: .3em .3em;\n            }\n            .field {\n                display: table-row;\n            }\n            .field > :first-child {\n                display: table-cell;\n                width: 20%;\n            }\n            .field.single > :first-child {\n                display: inline;\n            }\n            .field > :not(:first-child) {\n                width: auto;\n                max-width: 100%;\n                display: inline-flex;\n                align-items: baseline;\n                virtical-align: top;\n                box-sizing: border-box;\n                margin: .3em;\n            }\n            .field > :not(:first-child) > input {\n                width: 230px;\n            }\n            .form-footer {\n                display: inline-flex;\n                justify-content: flex-start;\n            }\n            .form-footer > * {\n                margin: 1em;\n            }\n            .text-scrollable {\n                overflow: auto;\n                height: 150px;\n                border: 1px solid rgb(200, 200, 200);\n                padding: 5px;\n                font-size: 1em;\n            }\n            .text-centered {\n                text-align: center;\n            }\n            .text-container {\n                margin: 1em 1.5em;\n            }\n            .flex-container {\n                display: flex;\n            }\n            .flex-container.column {\n                flex-direction: column;\n            }\n        </style>\n        <title>Access Denied</title>\n    </head>\n    <body><div class=\"message-container\">\n    <div class=\"logo\"></div>\n    <h1>Access Denied</h1>\n    <p>The page you requested has been blocked by a firewall policy restriction.</p>\n</div></body>\n</html>\n\r\n"

Could you please, tell me what i should do to resolve this??
Thank

Good evening,
I guess you have the same problem I was facing in the past - a private repository accessible without a proxy and a proxy-server (mandatory) for accessing the internet.

Here is my ~/.docker/config.json which uses a proxy-server for connecting to the internet und exception for my private registry:

matthias@*****:~$ cat .docker/config.json
{
        "auths": {
                "hum-docker-01.******.local": {
                        "auth": "**************"
                }
        },
        "psFormat": "table {{.Names}}\\t{{.Image}}\\t{{.RunningFor}} ago\\t{{.Status}}\\t{{.Ports}}",
        "proxies": {
                "default": {
                        "httpProxy": "http://***:***@proxy02.********.local:8081",
                        "httpsProxy": "http://***:***@proxy02.*******.local:8081",
                        "noProxy": "*.*******.local,localhost"
                }
        }
}

Maybe this config-snipped helps?

Hello @matthiasradde
Thank you so much for your help, i’ll give it a try.
Please, just a simple question from a newbie in docker world… how can i get the auth key?
Thank you in advance,

@lotfiboucherit the auth-key is created automatically if you use docker login ... and written to the config-file.

The psFormat I am using is for modifying the columns used with docker ps - so not really needed for the proxy-topic. I’ve just copied the complete config-file to show that there might be some other settings already available/in use.