ssh-keygen -o
使用 Enter 确认
cat ~/.ssh/id_rsa.pub
如果已经通过 http 方式下 clone 了代码,需要修改该仓库的文件,否则该仓库无法免密
修改前[remote “origin”]
url = https://github.com/xxx/xxx.git
fetch = +refs/heads/:refs/remotes/origin/
[remote “origin”]
url = git@github.com:xxx/xxx…git
fetch = +refs/heads/:refs/remotes/origin/
注意 git 后用 : 表示,或者从网上复制 git 地址下来。这样



