Troubleshooting
Problem
The Git command is not found even though you are sure that Git is in your PATH and you can run it in a Terminal that is opened outside of IBM Rational Application Developer.
Cause
When Opening the Terminal using the project's context menu Cordova -> Open in Terminal (in Rational Application Developer 9.1 it is located in the project's context menu and Open in Terminal) Rational Application Developer configures the PATH with the following values in this order:
- Cordova location: Configured in workspace preferences > Cordova > General tab
- Platform requirements
- For Android
- Oracle JDK bin folder
- Android SDK tools and platform-tools folders
- Ant bin folder
- For iOS
- XCode location
- Minimal locations for OS in PATH
- For Windows
- %SystemRoot%
- %SystemRoot%\system32
- For Linux and Mac
- /usr/local/sbin
- /usr/local/bin
- /sbin
- /bin
- /usr/sbin
- /usr/bin
If the Git command, or any other command that is to be executed in this Terminal, the Git functionality is not in any of these locations then it will not be found and fail to execute.
Diagnosing The Problem
When running Git command in the Terminal opened by Rational Application Developer, the output is "git: command not found"
Resolving The Problem
Make sure you add Git location in the PATH. For this, add the following in the Terminal window prior running the git command
- Microsoft Windows
> PATH=C:\Program Files\Git\cmd;%PATH%
- Linux and Mac
$ PATH="/opt/git/bin:$PATH"
Note that the locations depicted above might not match with your installation, therefore you need to check the install location before adding it to the PATH
Was this topic helpful?
Document Information
Modified date:
10 September 2020
UID
swg21687322