将 SSH 密钥添加到 macOS 的钥匙串中

git提交代码时,如果SSH密码并未免密,每次拉取,上传操作时都需要密码输入,

可将SSH`密钥添加到钥匙串中

javascript 复制代码
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 ([email protected])

通常是在将 SSH 密钥添加到 macOS 的钥匙串中时出现的,在 macOS 上使用的,它指出 -K-A 标志已经被弃用。

解决:

在添加 SSH 密钥时,使用新的标志,不会在出现弃用警告

html 复制代码
ssh-add --apple-use-keychain ~/.ssh/id_rsa

之后,在该仓库中的操作将不再需要输入用户名和密码,git 会自动使用存储的凭据

相关推荐
饼干ovo4 小时前
shell编程
java·git·github
st紫月6 小时前
用虚拟机安装macos系统之后进入Boot Manager页面
macos
bubiyoushang88811 小时前
解决 Git 访问 GitHub 时的 SSL 错误
git·github·ssl
tonngw13 小时前
【Mac 从 0 到 1 保姆级配置教程 16】- Docker 快速安装配置、常用命令以及实际项目演示
macos·docker·容器·开源·github·docker desktop·orbstack
海码00715 小时前
【版本控制】Git 和 GitHub 入门教程
git·github
powerfulzyh17 小时前
非Root用户启动SSH服务经验小结
运维·ssh
402 Payment Required17 小时前
serv00 ssh登录保活脚本-邮件通知版
运维·chrome·ssh
网硕互联的小客服18 小时前
503 Service Unavailable:服务器暂时无法处理请求,可能是超载或维护中如何处理?
服务器·git·github
abcnull20 小时前
github开源协议选择
git·github·开源协议
ItisNagatoYuki1 天前
Mac M芯片 RAG 极简流程 安装 ragflow + LM studio
macos