gpt4 book ai didi

git - 如何使用 'git credential-osxkeychain store' 从命令行添加凭据?

转载 作者:行者123 更新时间:2023-12-03 18:40:55 24 4
gpt4 key购买 nike

在 MacOS 中执行“git credential-osxkeychain”时,它显示选项“存储”,我猜它可以用来添加凭据。

我没有找到任何有关使用命令“git credential-osxkeychain store”添加凭据所需语法的文档,有人知道该怎么做吗?

请注意,我确实知道如何使用 MacOS 应用程序“钥匙串(keychain)访问”来执行此操作,我想知道如何使用命令行来执行此操作

最佳答案

git credential-osxkeychain store reads protocol/host/username/password从用换行符分隔的标准输入,所以给他们这样的东西:

echo "\
protocol=https
host=github.com
username=$NAME
password=$PASSWD" | git credential-osxkeychain store

所有4个参数都是 required .

关于git - 如何使用 'git credential-osxkeychain store' 从命令行添加凭据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53419660/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com