Skip to content
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

Composer Authentication requires #53

Open
andreibsl opened this issue Mar 22, 2024 · 7 comments
Open

Composer Authentication requires #53

andreibsl opened this issue Mar 22, 2024 · 7 comments
Assignees
Labels

Comments

@andreibsl
Copy link

andreibsl commented Mar 22, 2024

Hey, we're disabling the auth for the custom composer repo. On the front-end it works fine.

But when it comes to downloading via the composer commands, it's till asking for username and password.

Is there anything else that we need to disable in order for this to work?

I've also tried to enable user and password, but still doesn't work.

Thanks!

@Rarst
Copy link
Owner

Rarst commented Mar 22, 2024

What precisely do you mean by "disabling the auth" here? Belt's authentication is opt-in, it only works if you enable it by adding users in the config.

I would check if you have some form of authentication on your server/hosting level.

@Rarst Rarst self-assigned this Mar 22, 2024
@Rarst Rarst added the question label Mar 22, 2024
@andreibsl
Copy link
Author

By disabling the auth I meant not enabling it 😅
One problem that we also have is that we do want to password protect the repository, but even if we add the user and password, the Auth is not working.

Here is the link to the repo:
https://composer.simplylearn.com/

user: composer
pass: foo
hash: $2y$10$msun65gWqiqrrPksQNQNDephbP.rhwnq1QVcIdOAkE1nui7ItSaMO

Obviously, I'll change the credentials after we solve the issue 😅

@Rarst
Copy link
Owner

Rarst commented Mar 22, 2024

If you put a static file in the site root and try to open it in browser it do you get the authentication prompt? If so - it's not coming from the Belt.

@andreibsl
Copy link
Author

@Rarst
Copy link
Owner

Rarst commented Mar 22, 2024

What's your Belt config in entirety?

@andreibsl
Copy link
Author

andreibsl commented Mar 22, 2024

Here it is

<?php

declare(strict_types=1);

return [
    // Enable to put the application into the debug mode with extended error messages.
    // 'debug'                 => false,

    // Customize path to the directory containing release ZIP files.
    // 'release.dir'           => __DIR__.'/../releases',

    'users'                    => [
          // User login.
        'composer' => [
              // Provide password hash for HTTP authentication. See bin/encodePassword.php helper.
            'hash'     => '$2y$10$msun65gWqiqrrPksQNQNDephbP.rhwnq1QVcIdOAkE1nui7ItSaMO', // foo
        ],
    ],
];

@Rarst
Copy link
Owner

Rarst commented Mar 22, 2024

I'll try to reproduce later (I don't have my normal setup at the moment), but that looks ok. Can't remember if there are any issues if you don't actually allow/disallow anything for the user.

Also note that browsers can remember HTTP authentication requests very aggressively, so a relaunch/reboot doesn't hurt in between making changes to this stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants