Day06 [Git and HUAWEI CLOUD] Getting Started with Git and operating remotely

Hosting platform

  • Gitee
  • Github
  • Other: Huawei Cloud
  • Build it yourself

Gitee

》》1: Register an account
》》2: Create a remote warehouse
Insert picture description here

》》3: Account password, SSH password-free login
》》4: push, pull

SSH password-free login

(1) What is SSH?
SSH is the abbreviation of Secure Shell, formulated by the IETF Network Working Group; SSH is a security protocol based on the application layer. SSH is more reliable and is designed for remote login sessions and other network services.
(2) Principle The
server and the client do not transmit account passwords to avoid being used by packet capture and cracking
. The server randomly generates a string and sends it with a password. To the client, the client, decrypt the plaintext, and generate the digest value 1 The server is also the same plaintext, and also gets a digest value 2. If the same, it is considered that there is a legal secret key to log in.

Insert picture description here
(1) Use instructions to generate a secret key pair. Insert picture description here
(2) View the file
Insert picture description here
(3) Copy the public key to the server
Insert picture description here
(4) Add the personal public key
Insert picture description here

Operate remote warehouse

(1) Build your own local library first, then add the remote address

git init
git config --global user.name hadoop102@126.com
git config --global user.email  hadoop102@126.com
git remote add origin git@gitee.com:hadoop102/javaweb_day06.git
git pull origin master
git push origin master

(2) Clone the remote library directly without building a local library

git clone git@gitee.com:hadoop102/javaweb_day06.git
git config --global usre.name hadoop102@126.com
git config --global usre.email  hadoop102@126.com
git pull origin master
git push origin master

Guess you like

Origin blog.csdn.net/u013621398/article/details/108576497