bash: gitolite: command not found

喜欢而已 提交于 2019-12-04 13:09:08

This step comes after the Gitolite installation, which supposes you have chosen one of three possibilities:

  1. Keep the sources anywhere and use the full path to run the gitolite command.
  2. Keep the sources anywhere and symlink just the gitolite program to some directory on your $PATH.
  3. Copy the sources somewhere and use that path to run the gitolite command.

So make sure gitolite is in your PATH, and that command will work.

I prefer a local installation of gitolite (in a local directory, as opposed to /usr/local, which requires root privileges.).
See, for illustration, "install_or_update_gitolite.sh"

"${github}/install" -to "${gtl}/bin" # Note: "${gtl}/bin" is in my $PATH
GITOLITE_HTTP_HOME= gitolite setup -pk "${H}/.ssh/gitoliteadm.pub"

Note that for gitolite setup to properly work, you might want to set GITOLITE_HTTP_HOME to an empty string first.

Frank Myat Thu

As I also faced the same problem, I found the solution(s) as below.

First way is ...,

Open your terminal and key in below code

$ PATH=$PATH:~/bin

It is because the value of $PATH variable is point to incorrected path.
So I just modify this variable.

To be more detail click here.

Second way is ...,

Edit .bashrc file going to the end and insert below line.

PATH=/home/git/bin:$PATH

To be more detail click here.

On debian, there is no /usr/bin/gitolite

Linux debian-srv 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux ls: cannot access /home/gitolite/bin: No such file or directory 
ls: cannot access /usr/bin/gito*: No such file or directory

Here installing gitolite3 helped:

apt-get install gitolite3
root@debian-srv:# which gitolite
/usr/bin/gitolite
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!