0%

git 提交免密登录

前提

首先你要有ssh公钥和秘钥

查看当前git项目的提交方式

1
git remote -v

如果是 http 协议提交则会显示

1
2
origin  https://github.com/tanglintang/js_fullStack_study.git (fetch)
origin https://github.com/tanglintang/js_fullStack_study.git (push)

将 http 改为 ssh

在你的项目中,点击 clone or download,选择右上角 use ssh,将地址复制下来

1
git remote set-url origin 你的ssh地址

查看

1
2
3
$ git remote -v
origin git@github.com:tanglintang/js_fullStack_study.git (fetch)
origin git@github.com:tanglintang/js_fullStack_study.git (push)
-------------本文结束感谢您的阅读-------------