GIT Integration
Last updated
Last updated
Git is the world's most popular version control system. Version control allows you to maintain a history of changes to text files (such as a codebase) over time, tracking what changes were made, by whom, at what time, and for what purpose. Projects in Git are organized into repositories: a collection of files and changes to those files over time. Git is a distributed version control system, meaning that the main repository can be cloned (for example to a developer's laptop) and changes from multiple developers can be merged and pushed to a shared central repository.
A Git host is a service provider who hosts Git repositories. Git hosts may be on the cloud or in corporate on-premise infrastructure. A Git host provides a central place for teams to synchronize their changes, provides a central backup of the Git repository, and provides other services such as APIs, a user interface, and the ability to create merge requests (aka pull requests). There are many Git hosts. The most popular ones are:
GitHub
BitBucket
GitLab
Azure Repos
AWS CodeCommit (not accepting new customers)
Before registering Git with ARM, there are some prerequisites.
Ensure you enable the Git
plugin under Plugins
in the My Account
section to use Git for version control.
You must have permission in ARM to register a repository.
You must have credentials for the repository you want to access.
You must store these Git credentials in ARM.
This is an initial step in storing your user's credentials (usually a username, password, or token) in ARM. Some Git hosts like GitHub no longer support basic authentication using a username and password. You must now authenticate using an API token, such as an OAuth access token, GitHub App installation access token, or personal access token.
Log in to your ARM account.
Hover your mouse over the Admin
module and click on the Credentials
tab.
Next, click on Create Credential
from the right navigation bar.
On the next pop-up screen, give a Credential name
.
Choose the Credential Type
as Username With Password.
Enter your Username
for the Git host and API Token (in the Password
field), and we will store this encrypted. For more information on how to create an API token, see the Troubleshooting section on this page.
NOTE: If you are using SSO to log in to your Git Repository, you must Authorize the Generate API token. Click on the 'Configure SSO' dropdown to authorize the generated token.
Click Save
.
To set up a Git repository, follow the steps below:
Log in to your ARM account.
Hover your mouse over the Admin
module and click on VC Repo's
.
Click on Register Repository
.
Select the Version Control System
as Git
on the Register Repository
page.
Enter the name of the repository to display it locally.
Paste the Repository URL
from your Git host.
Choose the correct user's Credentials
from the list. To create new credentials, click on the **+
**icon.
Note: Click Test Connection to check if the connection has been authenticated or not. A success message is displayed after the authentication is completed.
The Default Branch
selection will be in disabled mode by default. Click the icon to fetch and list all the available branches on your remote repository.
Select one of the default branches from the list. Note:Ensure the default branch is available in your remote repository with some files committed to it. If no file is available, create a README.txt file and add it to the repository.
Once the registration is done, you can find the newly added repository on VC Repo's
home page.
Points to Remember:
Select the Enable SFDX
checkbox to register your Git repository in the SFDX structure.
Select the Enable nCino
checkbox to register the Git repository with nCino objects included. To quickly identify nCino registered Version Control Repositories among all other repositories, nCino logos are marked in front of the Repository Label.
The user can enable their Version Control Repository with SFDX or nCino enabled. Both cannot be enabled at the same time.
While registering Git with ARM, Git fails to connect, resulting in Authenticate Failure. This is because your credentials are invalid. Check the URL, username, and API token (or other authentication mechanism).