Here's possibility for cloning git private repository:
$ git clone https://github.com/username/repo.git
Username: your_username #the username
Password: your_token #the string that can be found by generating here https://github.com/settings/tokens
How to use in php
shell_exec("git clone https://github.com/username/repo.git");
with seting username and password?
question from:
https://stackoverflow.com/questions/65682057/php-shell-and-git-clone 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…