git连接github后续操作无密码
cat@DESKTOP-DTCAVNU MINGW64 /d/newgit
$ git init
Initialized empty Git repository in D:/newgit/.git/
cat@DESKTOP-DTCAVNU MINGW64 /d/newgit (master)
$ git config --global user.name "pang"
cat@DESKTOP-DTCAVNU MINGW64 /d/newgit (master)
$ git config --global user.emil "807907351@qq.com"
cat@DESKTOP-DTCAVNU MINGW64 /d/newgit (master)
$ ssh-keygen -t rsa -C "807907351@qq.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/24493/.ssh/id_rsa):
/c/Users/24493/.ssh/id_rsa already exists.
Overwrite (y/n)?
生成之后使用生成的路径找到.sh文件夹中的id_rsa.pub文件,将其中的内容全部复制到gitlib设置里面的ssh,就可以取消每次的代码输入了
ssh-keygen -t rsa -C"邮箱地址"
找到生成的密钥,添加到自己的gitlib个人设置里面的ssh里。
之后就可以选择克隆或是拉取操作
克隆例子:
在本地工作区内使用如下命令
git clone gitlib上的克隆码