C:Usersmax>ssh-keygen -t rsa -C 'max@qq.com' Generating public/private rsa key pair. Enter file in which to save the key (C:Usersmax/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in C:Usersmax/.ssh/id_rsa. Your public key has been saved in C:Usersmax/.ssh/id_rsa.pub. The key fingerprint is: SHA256:wYo8p7gqrYzJhkkCsvS6JT38iy/JVZM1USMo7AgZ3MA 'max@qq.com' The key's randomart image is: +---[RSA 3072]----+ |oo= . .ooo | | E . o o o. . | | . o . = . | |o. o o = . | |+.. + + S | |o.oo = | |+++=+ | |B++=+ | |B*o.o+. | +----[SHA256]-----+ C:Usersmax.ssh>dir Volume in drive C is 新加卷 Volume Serial Number is D038-23B6 Directory of C:Usersmax.ssh 2022-04-12 下午 05:002、gitlab设置ssh keys. 2022-04-12 下午 05:00 .. 2022-04-12 下午 04:51 2,610 id_rsa 2022-04-12 下午 04:51 1,675 id_rsa.pub 2022-04-12 下午 04:51 382 id_rsa.pub.pub 2022-04-12 下午 04:46 174 known_hosts 4 File(s) 4,841 bytes 2 Dir(s) 207,080,300,544 bytes free
gitlab——-user settings ——SSH Keys
将id_rsa.pub 内容粘贴到 key里,Title 随意命名。
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCdZqaRajdbW0yJj3B6/y5brqivcQNdaIFj91q8uBJuFjOBEgpnShsyrfBsvmG/70Y/7hYKfZriTeKE/ClteCxLBE3svvh7OBPVEYRcmWAJnXRqXcx6xfj6TRHpXRXEcbllN5FjH9KEN824is3bRhnDBLJLEIdIWLe7n3/EZH/hkk/SuVm6xWOL5b7hUC2in9Yi+C0ah/eZuIPtGdzx5zpUBysOVqvHua5JDp2s5ULXfKlEU78ExDnxEkzY378sJwsAPdpYC//n+54lFnk2WcHY4KkCnnl76QAsIHLxws7rJzSP2rixrM3ZhN6Y5GrrDr0EqWaJRdAlssMIOhjzvUjB3、gitlab git命令 Command line instructions Git global setup
git config --global user.name "max" git config --global user.email "max@qq.com"Create a new repository
git clone git@ip:max/apache-tomcat-z.git cd rsxtest touch README.md git add README.md git commit -m "add README" git push -u origin masterExisting folder
cd existing_folder git init git remote add origin git@ip:max/apache-tomcat-.git git add . git commit -m "Initial commit" git push -u origin masterExisting Git repository
cd existing_repo git remote rename origin old-origin git remote add origin git@ip:max/apache-tomcat-z.git git push -u origin --all git push -u origin --tags



