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 thegithub-oauthsection 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.