Local project link Gitee remote warehouse

1. Register a code cloud account and log in

insert image description here

2. Generate ssh key in local path

insert image description here

After installing git, go to the C:Users[username\Administrator] directory. If there is no .ssh folder, create one yourself and right-click gitbash in the folder, and enter the gitbash command line.

#进入 C:\Users\Administrator\.ssh目录
#生成公钥
ssh-keygen -t rsa

After entering the ssh-keygen -t rsa command, you can fill in the corresponding information according to the prompts.
If there is no special requirement, just press Enter until the end.
insert image description here

After success, two new files will appear in the directory (public key id_rsa.pub and private key id_rsa)
insert image description here

3. Go back to the code cloud to establish a connection with the local

Go back to Code Cloud and open the newly produced public key id_rsa.pub in text according to the picture, copy and add it to the public key of Code Cloud,
and enter the password to add it successfully
insert image description here

4. Establish code cloud remote warehouse

After clicking New Warehouse, you can select and fill in the options according to your personal needs.
Note: When choosing whether to open source - public, add an open source license (check the relevant agreement template by yourself)
insert image description here

5. After the creation is successful, clone to the local area and start developing

insert image description here

6. Associate the local project with the remote warehouse

6-1 First confirm whether there is an associated remote branch, if there is already an associated remote branch, first cancel the associated
git command operation

git remote remove origin

insert image description here

6-2 Associate remote warehouse
git command operations

 git remote add origin [远程仓库地址]

insert image description here

6-3 Check whether the association is successful
insert image description here

Guess you like

Origin blog.csdn.net/JavaD0g/article/details/113446690