git-shell报错的解决方法
git-shell报错
fatal: Interactive git shell is not enabled.
hint: ~/git-shell-commands should exist and have read and execute access.
已经在/etc/passwd文件中将登陆用户的shell改为git-shell
git:x:502:502::/home/git:/usr/local/bin/git-shell
解决办法:
将目录~git/contrib/git-shell-commands拷贝到git用户下/home/git/
修改所有者chown -R git.git git-shell-commands
如果该目录下的help和list没有执行权,那么再给它加执行权
chmod +x /home/git/git-shell-commands/help
chmod +x /home/git/git-shell-commands/list
su git测试下,应该能看见
Run ‘help’ for help, or ‘exit’ to leave. Available commands:list
命令描述,摘自README
help: Prints out the names of available commands.
list: Displays any bare repository whose name ends with “.git” under user’s home directory.
近期评论