在 MacOS 中执行 'git credential-osxkeychain' 时,它显示了选项 'store',我想它可以用来添加凭据。
我没有找到任何关于使用命令“git credential-osxkeychain store”添加凭据所需的语法的文档,有人知道怎么做吗?
请注意,我确实知道如何使用 MacOS 应用程序“钥匙串访问”来执行此操作,我想知道如何使用命令行来执行此操作
phd*_*phd 14
git credential-osxkeychain store 从由换行符分隔的 stdin读取协议/主机/用户名/密码,因此向它们提供如下内容:
echo "\
protocol=https
host=github.com
username=$NAME
password=$PASSWD" | git credential-osxkeychain store
Run Code Online (Sandbox Code Playgroud)
所有 4 个参数都是必需的。