怎样让Git每次PUSH不用重复输入密码

如题所述

如果你的Git每次PUSH操作都要重复输入密码,检查其它的设置也没有问题,那原因很大可能是你在生成密钥时设置了密码。通常密钥是这样生成的:
打开命令行终端输入 ssh-keygen -t rsa -C "[email protected]" ( 你的邮箱),连续点击 Enter 键即可,中间提示输入密码时不要输入。

1
2
3
4
5

ssh-keygen -t rsa -b 4096 -C "[email protected]"
# Creates a new ssh key, using the provided email as a label
# Generating public/private rsa key pair.
Enter file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter] // 推荐使用默认地址
Enter passphrase (empty for no passphrase): //此处点击 Enter 键即可,也可以填写密码,但填写密码后每次使用 SSH 方式推送代码时
温馨提示:答案为网友推荐,仅供参考
相似回答