What's going on with git: command not found?
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-05-02 09:31:12
0
2
1500

Use git --version to see the version

[www@i001 ~]$ git --version
git version 2.8.0

But when I want to clone something, it turns out to be git: command not found. What’s going on?

[www@i001 ~]$ sudo -Hu www git clone https://git.coding.net/msiaxxxx/test001.git /home/wwwroot/test001  --depth=1
sudo: git: command not found

After adding the git installation path, execute

[www@i001 ~]$ sudo -Hu www /usr/local/git/bin/git clone https://git.coding.net/msiaxxxx/test001.git /home/wwwroot/  --depth=1
fatal: could not create work tree dir '/home/wwwroot/test001': Permission denied

is Permission denied, and the same thing happens when you switch to root user.

曾经蜡笔没有小新
曾经蜡笔没有小新

reply all(2)
左手右手慢动作

Have you installed it? It should not be installed, right?

If you try to type git 看会得到什么,如果还是 not found directly, it means it is not installed. Normally, mine will output:

我想大声告诉你
  1. Why use sudoclone?

  2. sudo /usr/bin/git clone xxxxx

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template