I am using following command to install magento 2.4.7 in xampp on windows platform,
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.4.7 magento2
I am getting following error,
Note : I know my private key and public key, when i enter the command it's never asking the details
Run this command to store your keys:
composer config --global http-basic.repo.magento.com <public_key> <private_key>
Make sure your authentication keys are saved in auth.json. You can find it in C:\Users\<YourUsername>\AppData\Roaming\Composer on Windows. It should look something like this:
{
"http-basic": {
"repo.magento.com": {
"username": "<public_key>",
"password": "<private_key>"
}
}
}
Sometimes clearing the cache helps. After these steps, run your installation command again.
Still getting same error.
Hello @dravenlock48ba,
The error you are encountering, cURL error 28: Failed to connect to repo.magento.com port 443: Timed out, typically occurs when your system cannot establish a connection with Magento's repository. This issue can arise due to various reasons, such as network issues, firewall restrictions, or misconfigured system settings.
Test the connection to Magento's repository using curl:
curl -v https://repo.magento.com
Ensure you have correctly configured your Magento Marketplace authentication keys in Composer. Add your keys by running:
composer config --global http-basic.repo.magento.com <public_key> <private_key>
The timeout might be too short for the request to complete. Increase it by running:
composer config --global process-timeout 2000
Update Composer
Ensure you are using the latest version of Composer:
composer self-update
Retry the installation with verbose output to identify further issues:
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.4.7 magento2 –vvv
If the above steps fail, try connecting from a different network to rule out ISP restrictions. Still not solved? Do not worry; check our technical blogs for solutions. or
If the issue is resolved, click Kudos and accept it as a solution.