Previous problems
Failed to pull from the server,
The PHP shell function fails to call git pull, but it is okay to execute git pull on the machine with the root permission alone.
The Shell Permission called by PHP is actually because the user WWW indicates that the WWW permission is unsuccessful, indicating that the user WWW has no permission. Therefore, you need to configure the permission for WWW.
1 first, set the home directory/home/uwww for WWW in/etc/passwd.
2. Let him have the logon permission to execute shell, home/uwww/bin/bash.
3 save and exit
4. Assign the user group chowm WWW to home/uwww: WWW Home/uwww
5. Switch su WWW to enter the WWW user login and execute the generated key
Ssh-keygen-t rsa-c "your mailbox"
Copy the generated password to the SSH key of gitlab.
At this point, the WWW user has the permission to perform git operations.
Git pull deployment problem solving