Clone the git repository

You can clone the latest code from the Magento Open Source GitHub repository, and use code from a release branch or a development branch.

You can checkout a specific branch after you clone the repository to your local development environment. See Cloning a repository in the GitHub Docs.

Authentication and access

The Adobe Commerce repository requires authentication, so you must prepare the following:

Authentication file

You must create an auth.json file that contains your Adobe Commerce authorization credentials in the Magento root directory.

To create an authentication file:

  1. If you do not have an auth.json file in your Magento root directory, create one.

    • Using a text editor, create an auth.json file in the Magento root directory.
    • Copy the contents of the sample auth.json file into the new auth.json file.
  2. 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>"
        }
    }
    
  3. Save your changes and exit the text editor.

data-variant=warning
data-slots=text
Pushing an auth.json file to a public repository can expose your credentials.

After completing the tasks discussed on this page, see update installation dependencies.