我刚刚在我的CentOS 6上安装了git (yum安装)。我想克隆一个存储库,但请记住,以root用户身份运行GIT是不安全的,所以我尝试以管理员身份(我真的不记得他的密码了)。下面是一个命令流。
[root@angkor public_html]# runuser -l admin 'git'
/bin/git: /bin/git: cannot execute binary file
[root@angkor public_html]# su - admin git
Last login: Tue May 28 11:00:08 UTC 2019 on pts/0
/bin/git: /bin/git: cannot execute binary file
[root@angkor public_html]# git
usage: git [--version] [--help] [-c name=value]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
正如我们所看到的,当我以root身份运行git时,它会启动,但当我试图以admin身份运行它时,会报告一些错误。为什么以及如何修复它?
发布于 2019-05-28 19:29:43
https://stackoverflow.com/questions/56341135
复制相似问题