Code Cloud SSH Free Password - IDEA & Eclipse

1 Introduction

Use GitHub as a project hosting website. If the internet speed is not good, it will affect efficiency. You can also use the domestic project hosting website-Code Cloud. The website is https://gitee.com/ , the usage is the same as GitHub, and it is also a Chinese website, if your English is not very good, it is the best choice.

2. Configure SSH password-free login

Uploading projects through HTTPS mode on Code Cloud is the same as on GitHub, but uploading projects on Code Cloud always enter the user name and password, which is more troublesome, so I will show you how to upload projects through SSH mode without password login and use SSH mode. The advantage is that you do not need to enter a user name and password each time you upload a project, and SSH password-free login is also applicable to GitHub.

The premise of using SSH mode is that you must be the owner or collaborator of this project and have an SSH Key.
The steps to configure SSH Key are as follows:

  1. Enter the user directory of the computer, right-click the user directory to open the Git command line window
    Insert picture description here

  2. Create an SSH Key and
    enter the following command in the command line window

ssh-keygen -t rsa -C 任意内容

Command Parameters Description:
-t = of The Key to Generate The type of
type of key
-C = comment to identify the key
annotation for identifying the key
Insert picture description here

Enter the command and press Enter, and then press Enter, Enter, and Enter
Insert picture description here

  1. If the SSH Key is successfully created, a .ssh folder will be generated in the user directory
    Insert picture description here

  2. Go to the .ssh folder, view the id_rsa.pub file, and copy all the contents
    Insert picture description here

  3. Find the settings of the code cloud account
    Insert picture description here

  4. Click the SSH public key, set the title, paste the public key, and click OK
    Insert picture description here

Tips: Multiple SSH public keys can be added to the code cloud account, but a computer can only authorize one user to log in without password
7) Copy the SSH address of the warehouse in the code cloud account
Insert picture description here

3. Upload the project through SSH mode in Eclipse

After the SSH Key is created, Eclipse can automatically identify the corresponding public key and private key files
Insert picture description here

Steps to upload project via SSH mode:

  1. Right click on the project to upload
    Insert picture description here

  2. Click New Remote...
    Insert picture description here

  3. Copy the address in SSH mode and give the remote address an alias
    Insert picture description here

  4. Because it is the first time to use SSH mode, after clicking Finish, you need to check the save key, and check to create the known_hosts file. This is not necessary in the future
    Insert picture description here
    Insert picture description here

  5. Click Preview to enter the confirmation upload window
    Insert picture description here

  6. Click Push to start uploading, no longer need to enter username and password
    Insert picture description here

  7. Uploaded successfully
    Insert picture description here

4. Upload the project through SSH mode in Idea

  1. Create a new warehouse in the code cloud account and copy the address in SSH mode
    Insert picture description here

  2. Right click on the project to be uploaded in Idea
    Insert picture description here

  3. Click origin→Define Remote in the pop-up window
    Insert picture description here

  4. Set SSH mode remote address and alias
    Insert picture description here

  5. Select the defined sshorigin to start uploading the project
    Insert picture description here

  6. Click Push to upload directly
    Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_44556968/article/details/109740128