How to have your own Gitee code repository

This tutorial is applicable to the code cloud code hosting platform https://gitee.com/First
install Git on the computer (there is a Git tutorial on the beep station) and register a gitee account before reading this tutorial

1. Click SSH public key on the settings page

chrome_waECEg2p8P

2. Click How to Generate Public Key

chrome_TIPMOVTpP1

3. Click Public Key Management

chrome_rpzSvoetAY

4. Click Generate\Add SSH Public Key

chrome_EUcThhAa4Q

5. Open the terminal and enter the command in the red box as shown in the figure and change the mailbox in the blue box to the email address you registered with gitee

chrome_vRf7pvhoSB

WindowsTerminal_soCtKQdKKW

6. After the input is completed, press Enter three times to eliminate the need to enter the content

WindowsTerminal_HPzDbRiLon

7. At this time, a public key will be generated and stored in (C:\Users\Administrator/.ssh/id_ed25519): This path can be seen after pressing Enter

explorer_rnwyO7vafv

8. Use Notepad to open the file ending in .pub circled by the red frame. After opening, copy and paste all the content into the red frame area in the figure below

chrome_Iwm8sQNZS2

9. Click OK and enter the gitee account password

chrome_FUbI1bUdMI

10. Seeing this page means that the creation of the public key is complete

chrome_LEtks3nQIx

11. On this page, you can see the public key you just created

chrome_A6z5PkMAUa

12. After the addition is successful, enter the following command in the terminal to test whether it is available

chrome_KG3ym7uaxQ

13. Enter yes after the carriage return

chrome_rPOHMXuNmc

14. If Hi XXX! You've successfully authenticated, but Gitee.com does not provide shell access.the content , it proves that the addition is successful.

WindowsTerminal_KMo0qErKNe

Create warehouse upload code

1. Hover the mouse over the plus sign and select a new warehouse first

chrome_ZiPzRCpx2k

2. Create a warehouse nickname and click Create

chrome_1j8ANzAZZ7

3. Open the project folder and right-click to open it in the terminal

4. Enter two lines of Git global settings in sequence in the terminal

chrome_1l604oC0Ja

Execute first git initto initialize the warehouse

5. Enter git status to view the status of the folder. If the following content is displayed, you need to execute this command

git config --global --add safe.directory "*"

WindowsTerminal_RZSVP4Alyr

6. Execute git status again. At this time, all files are all red. Executegit add .

WindowsTerminal_PInT63K2kZ

7. git add .After all files are all green

WindowsTerminal_WMPQ6egcOo

8. Execute after all green git commit -m "first commit"and make a submission locally

9. Execute git status after executing the above command to check the status and display the following content to indicate success

WindowsTerminal_OIkPZ8PUMT

10. Finally, submit the code to the Gitee code hosting platform and execute the following two commands

chrome_omRVnacCtv

WindowsTerminal_o63V9OYHNk

11. Refresh the page to view the submitted code

chrome_unYfyjhIIO

Guess you like

Origin blog.csdn.net/weixin_43472938/article/details/129206331