6

Git 频繁要输入密码的问题 - rxliuli blog

 2 years ago
source link: https://blog.rxliuli.com/p/224a1dc91731489097aeb59f62d16558/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

本文最后更新于:2021年8月22日 下午

突然就遇到了,每次使用 Git 进行 pull/push 操作时都要输入密码,真是超级麻烦!

Git 服务器上面设置了 SSH 密钥但仍然使用 HTTP/HTTPS 连接就会出现这个问题

1. 配置一个本地文件记录用户名/密码

进入到 git 根目录下,执行下面的命令即可

1
git config --global credential.helper store

2. 使用 SSH 连接

在本机生成一个密钥对(已有的话就不需要了),参见 使用 SSH 连接 Linux 服务器,将密钥对的公钥(id_rsa.pub)配置到你的远程仓库即可。

GitHub SSH 设置



About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK