Follow the steps below to clone Magento2 official git branch.
STEP 1: Clone the Magento repository
You can clone the latest code from the Magento GitHub repository
git clone https://github.com/magento/magento2.git
STEP 2: Create an authentication file
- Create an
auth.jsonfile in your Magento root directory. - Copy the contents of the sample
auth.jsonfile into the newauth.jsonfile. - ReplaceÂ
<public-key> andÂ<private-key> with your Adobe Commerce authentication credentials. Add theÂgithub-oauth section and replace theÂ<personal-access-token> with the one you created for your GitHub account.
{
"http-basic": {
"repo.magento.com": {
"username": "<public-key>",
"password": "<private-key>"
}
},
"github-oauth": {
"github.com": "<personal-access-token>"
}
}
STEP 3: Install composer dependencies by running the below command.
composer install
Hope this helps, Thanks 🙂
Be the first to comment.