Skip to main content

Installing and Configuring Git

Installing Git

Before you start using Git, you have to make it available on your computer. Even if it’s already installed, it’s probably a good idea to update to the latest version. There are a few ways to install Git. The most official build is available for download on the Git website. The Git integration is installed together with Checkmarx CxSAST on the CxSAST Manager Server using the default installation settings as follows:

1. Go to https://git-scm.com/download. The download starts automatically.

2. Once downloaded, run the installation.

3. Keep the default settings and click <Next>. The Path Environment screen is displayed.

6436184932.png

4. Select Use Git from Git Bash only. This ensures that Git is installed on the CxSAST Manager server for the sole purpose of performing Git scans using CxSAST. This also keeps the installation minimal.

5. Keep the default settings and click <Next>. The installation is completes.

6. Navigate to: C:\Program Files\Git\bin and confirm that git.exe is available. git.exe is required to run scans.

Configuring Git in Checkmarx CxSAST

To configure Git, do the following:

1. Make sure that your CxSAST license is SDLC and you are logged in as an admin user.

2. From within CxSAST, go to Management > Application settings > General > Server Settings and edit the Path to GIT client executable setting according to the git.exe location as defined in the Git installation and configuration, e.g., C:\Program Files\Git\bin\git.exe.

6436184929.png

3. Save the changes.

Enable Long Path Support in Git

Older versions of Windows do not support files and folders whose names exceed 260 characters. This applies to Windows Explorer, cmd.exe and many other applications (including many IDEs as well as bash, perl and tcl that come with Git for Windows). Therefore, Long Paths support in Git for Windows is disabled by default.

To enable long path support when using GIT Source pulling in CxSAST, set the core.longpaths option to true. To do so, open a CMD instance and run the following command:

git config --system core.longpaths true

Notice

Notice

  • Scripted Git commands may still fail with this option, so use at your own risk.

  • This should be run on the server that contains Git.exe

For additional information about this limitation,refer to the GitHub documentation.