[!] git was not found in $PATH
时间: 2023-09-23 20:12:10 浏览: 109
python-gitpath:一个小的python模块,使在git仓库中的工作变得更容易
This error message indicates that the Git executable is not installed or not accessible on your system.
To resolve this issue, you can install Git by following the instructions on the Git website for your operating system. Once Git is installed, you may need to add the Git executable to your system's PATH environment variable so that it can be accessed from the command line.
To add Git to your PATH on Windows, you can follow these steps:
1. Open the Start menu and search for "Environment Variables".
2. Click on "Edit the system environment variables".
3. Click on the "Environment Variables" button.
4. Find the "Path" variable in the "System variables" section and click "Edit".
5. Click "New" and add the path to the Git executable (e.g. "C:\Program Files\Git\bin").
6. Click "OK" to close all the windows and save your changes.
On Linux or macOS, you can add Git to your PATH by adding the following line to your shell configuration file (e.g. ~/.bashrc or ~/.zshrc):
```
export PATH=$PATH:/path/to/git
```
Make sure to replace "/path/to/git" with the actual path to the Git executable on your system. Once you have made this change, you should be able to use Git from the command line.
阅读全文