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.
-
A release branch is a stable, full-featured code branch officially released with a version number, such as 2.4. You must use a release branch with the Data Migration Tool.
-
A development branch, or feature branch, is a less-stable code branch with the latest code intended as the next version or to introduce a specific feature.
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 key—You must have an authentication key to access the Adobe Commerce Composer package on
repo.magento.comand to enable install and update commands for your project. -
GitHub personal access token—Composer requires a personal access token in the
github-oauthproperty to authorize GitHub repository access. When you create this token, select all options in thereposcope.
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:
-
If you do not have an
auth.jsonfile in your Magento root directory, create one.- Using a text editor, create an
auth.jsonfile in the Magento root directory. - Copy the contents of the sample
auth.jsonfile into the newauth.jsonfile.
- Using a text editor, create an
-
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>" } } -
Save your changes and exit the text editor.
data-variant=warning
data-slots=text
auth.json file to a public repository can expose your credentials.After completing the tasks discussed on this page, see update installation dependencies.