[Git] Gui graphical management, SSH protocol private library integrated with IDEA use

1. Using Gui graphical interface

1. Open the manager according to your needs

2. Clone an existing library

3. Introduction to graphical interface

1. First update a code file in the local warehouse and use it:

2. Enter the graphical management interface to refresh code resources:

3. Click Stage changed to track the file and put the file in the temporary storage area.

4. Through Commit/Push, you need to fill in the remote warehouse address when pushing files to Code Cloud.

Submitting via Commit requires a signature to commit:

5. Upload successful:

Remote warehouse:

2. SSH protocol

2.1 SSH introduction

SSH, full name Secure Shell, is a network security protocol. Its main function is to provide encrypted communication channels in an insecure network environment, such as the Internet, to ensure the security of information transmission.

In the early days, Internet communication mainly relied on clear text transmission, which meant that once the data was intercepted, the content information would be exposed. In order to solve this problem, Finnish scholar Tatu Ylonen designed the SSH protocol in 1995, which can encrypt all login information, thus becoming a basic solution for Internet security.

The operating mechanism of the SSH protocol is to realize the connection between the SSH client and the server by creating a secure tunnel in the network. This way, users can securely perform operations on the remote server, such as accessing and managing the server’s file system. In addition, SSH also provides secure remote command execution functionality.

2.2 Configure SSH key

First, change our warehouse to private status and create a new private library.

1. Create a new local warehouse to save private libraries

2. Use the cd ~/.ssh command to check whether there is ssh on this machine. No ssh key is generated.

Here you need to fill in the email information for configuring git:

 ssh-keygen -t rsa -C "email" 

The .gitconfig file in the user folder of the local c drive:

After running the command, you need to press Enter three times

At this time, there will be a .ssh folder in the local user directory, in which the private key and public key are generated.

3. Configure SSH public key (only the configured SSH public key can be accessed)

After adding the public key, you need to use the password to log in to git for verification:

4. Clone and download the private repository via SSH

3. IDEA (2023 version) integrates Git

3.1 IDEA configuration Git

1. Configure the git.exe file in IDEA

Copy the git.exe file path configuration in the bin folder in the git directory to idea

2. Install the gitee plug-in

3. Generate token token

Login password verification is required before it can be generated. Please save the token code after generation (because it will only appear once)

4. Log in to gitee

login successful:

3.2 IDEA operates remote warehouse

1. Push code resources to the remote warehouse

Configure uploaded warehouse information

Refresh the gitee remote repository to see the code resources you just pushed.

2. Pull the remote warehouse code to the local one

Finish:

3. Update code

1. If you modify the project, you need to upload the updates to git, as shown in the figure:

2. You can see the list of codes that can be submitted on the left. Click to view the code content before and after modification.

3. After clicking COMMIT to submit, master –> Push upload

After the upload is successful, you can refresh git to view: