gpt4 book ai didi

linux - git: 'pull' 不是 git 命令 - CentOS VPS 服务器

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:04:02 24 4
gpt4 key购买 nike

我最近设置了一个新的 VPS,并通过 yum 和 wget 等安装了 Git。一切似乎都很好 - 我可以添加、提交、设置远程并推送到 github。

但是,当我尝试从 github 中 pull 时:

user@domain.com [~]# git pull github master
git: 'pull' is not a git command. See 'git --help'.

Did you mean this?
shell

不,我不是说 shell,我是说 pull !

现在我用谷歌搜索了这个 - 包括阅读 Stackoverflow 上的几篇文章:

"git pull" broken

git: 'pull' is not a git command. See 'git --help'

虽然大多数帖子似乎都是关于 Mac 的问题(我在 CentOS 服务器上),但似乎是 git exec 路径的问题,即

user@domain.com [~]# git --exec-path
/usr/local/libexec/git-core

我试过向 .bashrc 添加各种内容,但没有成功。

关键是当我 cd 到/usr/local/和 ls -l 时,我看不到 libexec 目录。

但是如果我以 root 身份登录,我可以 cd 到/usr/local/并看到 libexec/,里面是 git-core。我也可以 git pull 作为 root。

所以 - 我怀疑问题更多地与权限和服务器设置有关,而不是 git 本身。

我试过了

sudo chmod a+rx /usr/local/libexec

但现在也没有...

当我 ssh 进入另一台服务器时,作为帐户用户,我可以 cd 到/usr/local 并查看 libexec - 所以这个服务器设置有问题。

感谢收到的任何想法。

最佳答案

现在解决了 - 服务器正在使用 jailshell ...禁用 jailshell 并使用“普通”shell 是一种享受

关于linux - git: 'pull' 不是 git 命令 - CentOS VPS 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16047025/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com