在 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/