【问题标题】:php, shell and git clonephp、shell 和 git 克隆
【发布时间】:2021-04-17 07:01:39
【问题描述】:

以下是克隆 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");

设置用户名和密码?

【问题讨论】:

    标签: php github


    【解决方案1】:

    你试过了吗

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

    Source

    【讨论】:

    • 它只适用于自己的本地主机,而不适用于服务器。
    猜你喜欢
    • 1970-01-01
    • 2023-03-16
    • 2023-03-27
    • 2012-10-08
    • 2010-11-20
    • 2017-02-25
    • 2015-09-23
    • 1970-01-01
    相关资源
    最近更新 更多