jc21 / docker-registry-ui

😎 A nice web interface for managing your Docker Registry images
MIT License
324 stars 71 forks source link

Basic Auth Error #20

Open Nassiel opened 4 years ago

Nassiel commented 4 years ago

With the latest versión, when you use a registry that uses basic authentication, I receive the next error: [4/19/2020] [8:03:15 PM] [Express ] › ⚠ warning Error: getaddrinfo ENOTFOUND USER User:443

For you see the real user name. After doing some research, right now the basic auth is doing by concatenating the user:pass inside the calling URL. Despite this could work, the restler parser is failing and takes the user as FQDN for the DNS.

My recommendation is to change how the options of restler are being generated and use the username and password parameters. Something like:

this.getUrlOptions = function (version) {
    let options = {
        headers: {
            'User-Agent': 'Docker Registry UI'
        },
        username = username,
        password = password
    };

    if (version === 2) {
        options.headers.Accept = 'application/vnd.docker.distribution.manifest.v2+json';
    }

    return options;
};

I tried to debug the solution but it fails with the table-ui so I cannot send you a pull request. Thanks!

fjgsanandres commented 3 years ago

There are no solution for this? :(

Nassiel commented 2 years ago

Hi, @jc21 @jamesdube @huapox. Are you open to allowing more contributors to the project? Many requests, issues and PRs are open without an answer for a long time, and I think it's a shame because the solution is quite good, I'd say, to abandon it. What do you think?

Nassiel commented 1 year ago

@jc21 @jamesdube @huapox @xvmaatmat any option to be added as a contributor to keep this alive or can I close this PR forever?