0

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, enter image description here

Note : I know my private key and public key, when i enter the command it's never asking the details

asked Dec 3, 2024 at 12:33
5
  • Did you add your magento public and private key when composer ask or you can add it in your root auth.json file Commented Dec 3, 2024 at 12:35
  • @Zahirabbas After added auth.json file under C:\xampp\htdocs getting same error, pls correct me if i am wrong. Commented Dec 3, 2024 at 14:59
  • hello, @zus your error is solved or not.? Commented Dec 10, 2024 at 13:40
  • @mohitvamja Not yet. Commented Dec 11, 2024 at 8:03
  • 1
    Check if it's happening because ipV4 is not working correctly. Follow steps in the answer of this question - stackoverflow.com/questions/73015187/… Commented Dec 17, 2024 at 7:04

5 Answers 5

0

Create auth.json file in your root directory with your public and private key with below code.

 {
 "http-basic": {
 "repo.magento.com": {
 "username": "sdfdsfdsfdsfdsfdsfsdfdsfsdfdsfsd",
 "password": "sdfdsfdsfsdfsdfsdfsdfsdfd"
 }
 }
}
answered Dec 3, 2024 at 12:38
1
  • Getting same error. Commented Dec 6, 2024 at 8:46
0

To install Magento 2 using the command line, you need to configure the public and private keys in Composer. These keys are required to authenticate with Magento's repository.

Here’s the command to set the private and public key in Composer:

composer config --global http-basic.repo.magento.com <public_key> <private_key>

Replace:

  • <public_key>: Your Magento Marketplace public key.
  • <private_key>: Your Magento Marketplace private key.

Example:

If your public key is abc123 and your private key is xyz789, the command would look like this:

composer config --global http-basic.repo.magento.com abc123 xyz789

Once the keys are set, you can proceed with installing Magento 2 using Composer. Let me know if you'd like detailed installation steps!

answered Dec 10, 2024 at 16:48
4
  • I did same, but not working. Commented Dec 11, 2024 at 8:02
  • @zus You're still getting the same error? Commented Dec 11, 2024 at 12:23
  • Try to run composer clear-cache command once and after that try to run above config command and next magento installation command, make sure you remove magento2 directory before running commands again. Commented Dec 11, 2024 at 12:26
  • Hi, any help on this magento.stackexchange.com/q/375850/57334 Commented Dec 13, 2024 at 10:11
0

Make sure your internet connection is stable. Verify that the curl library is enabled in your XAMPP setup and ensure all other libraries required for Magento 2 are properly configured. Additionally, check your Composer version for compatibility.

If the problem continues, you may try using WAMP software as an alternative.

answered Dec 10, 2024 at 12:48
0

We shouldn't install Magento on the Windows hosting machine. I encourage you to use Docker and Warden tool to setup your Magento project.

In your case, you can add the verbose mode -vvv to see more details.

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.4.7 mage247test -vvv
answered Dec 13, 2024 at 12:45
3
  • I am getting following error once i run the command, [Composer\Downloader\TransportException] curl error 60 while downloading repo.magento.com/packages.json: SSL certificate problem: unable to get local issuer certificate Commented Dec 13, 2024 at 15:54
  • If i run composer create-project --repository-url=repo.magento.com magento/project-community-edition=2.4.7 mage247test -vvv , I am getting an error, any idea about this error, i.sstatic.net/Cbocq7Pr.png Commented Dec 16, 2024 at 10:40
  • 1
    @zus please change the Wifi Network and try again. Commented Dec 17, 2024 at 13:38
0

On Windows operating systems, the problem might be caused by a DNS issue. Try flushing the DNS cache by running the following command: ipconfig /flushdns.

Source: https://stackoverflow.com/a/76842312.


Instructions to Flush DNS on Windows:

For Windows 10 and Windows 11

1. Open Command Prompt as Administrator:

  • Press Windows Key + S to open the search bar.
  • Type cmd or Command Prompt.
  • Right-click on Command Prompt from the search results and select Run as administrator.

2. Flush DNS Cache:

  • In the Command Prompt window, type the following command and press Enter:
ipconfig /flushdns

You should see a message saying: Successfully flushed the DNS Resolver Cache.

3. Close the Command Prompt:`

Once the message appears, you can close the Command Prompt window.

For Windows 7 and Windows 8:

1. Open Command Prompt as Administrator:

  • Press the Windows Key, type cmd or Command Prompt.
  • Right-click Command Prompt from the search results and choose Run as administrator.

2. Flush DNS Cache:

  • In the Command Prompt window, type the following command and press Enter:
ipconfig /flushdns
  • You should see a confirmation message saying: Windows IP Configuration. Successfully flushed the DNS Resolver Cache.

3. Close the Command Prompt:

  • After the message appears, you can close the Command Prompt.
answered Dec 15, 2024 at 17:18

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.