[Git\GitHub\GitLab Study Notes] Version Control Git Video Tutorial Complete Works (62P) | 6 hours from entry to master (P42)

table of Contents

  1. P42-SSH password-free login

P42-SSH password-free login

Benefits: Eliminate the need to enter account passwords.
Limitations: only one account can be set to password-free login, but in the actual development process, a computer only logs in to one github account and only operates its own github account, so only one account can be configured SSH password-free login seems to have no effect.

cd ~ #进入用户家目录
rm -r .ssh	#删除之前创建的ssh目录删掉
ssh-keygen -t rsa -C [要登陆的github邮箱账号] #一路回车使用

Insert picture description here

Insert picture description here
Insert picture description here
Insert picture description here
Click new ssh key. The
Insert picture description here
Insert picture description here
server side is set up, then return to the client for testing.
Back to the working area for testing.
Insert picture description here

vi huashanjianfa.txt
git commit -m "test ssh" huashanjianfa.txt
git remote -v
git remote add origin_ssh [github ssh link]
git remote -v
git push origin_ssh master

Insert picture description here

Guess you like

Origin blog.csdn.net/kz_java/article/details/114636978