git
提交代码时,如果SSH
密码并未免密,每次拉取,上传操作时都需要密码输入,
可将SSH`密钥添加到钥匙串中
git config --global credential.helper store
报错:
WARNING: The -K and -A flags are deprecated and have been replaced
by the --apple-use-keychain and --apple-load-keychain
flags, respectively. To suppress this warning, set the
environment variable APPLE_SSH_ADD_BEHAVIOR as described in
the ssh-add(1) manual page.
Identity added: /Users/menmen/.ssh/id_rsa (xxx@xxx.com)
通常是在将 SSH
密钥添加到 macOS
的钥匙串中时出现的,在 macOS
上使用的,它指出 -K
和 -A
标志已经被弃用。
解决:
在添加 SSH
密钥时,使用新的标志,不会在出现弃用警告
ssh-add --apple-use-keychain ~/.ssh/id_rsa
之后,在该仓库中的操作将不再需要输入用户名和密码,git
会自动使用存储的凭据