php, shell and git clone



以下是克隆git私有存储库的可能性:

$ 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

如何在php 中使用

shell_exec("git clone https://github.com/username/repo.git");

设置用户名和密码?

你试过吗

shell_exec("git clone https://username:password@github.com/username/repo.git");

最新更新