【问题标题】:Saving git credentials ubuntu www-data保存 git 凭据 ubuntu www-data
【发布时间】:2018-10-20 00:02:46
【问题描述】:

有没有办法为 ubuntu 上的 www-data 用户保存凭据?我需要将它推送到 php 脚本中的私有 Github 存储库,但目前由于每次运行都需要凭据,它无法正常工作。

提前致谢:)

【问题讨论】:

标签: php git nginx github


【解决方案1】:

如果您使用 SSH 而不是 HTTPS 访问 GitHub 远程,您可以使用 SSH 密钥进行身份验证。生成一个无密码的 SSH 密钥作为 www-data,然后在 GitHub 设置中添加生成的公钥。

见:https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/#platform-linuxhttps://help.github.com/articles/reviewing-your-ssh-keys/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-07-06
    • 2014-09-05
    • 2014-12-09
    • 2016-02-07
    • 1970-01-01
    • 2019-10-04
    • 2018-11-22
    • 1970-01-01
    相关资源
    最近更新 更多