添加用户 git [root@centos100 ~]# useradd git 设置密码 [root@centos100 ~]# passwd git 更改用户 git 的密码 。 新的 密码: 重新输入新的 密码: passwd:所有的身份验证令牌已经成功更新。 添加到 sudo 组 [root@centos100 ~]# vi /etc/sudoers.d/custom_users 输入 git ALL=(ALL) ALL 并保存。