After you create a warehouse code to a local cloud clone

1. Create a project

First of all, we need to create code in a cloud of his own project:
Here Insert Picture Description
As shown above, the name of the warehouse can name the name of your project, then fill in the name of the warehouse, followed by the path will be displayed simultaneously, you can enter some simple introduction warehouses, private choice, according to their language development language selection, click create to create a new project.
Here Insert Picture Description
Then into the project, as shown above, click clone / download, SSH will address, copy the address (this address is warehouse cloned using this address to a local Git);

2. In the cloud code, there are two public key

At first: in the settings, as shown below:
Here Insert Picture Description
Second place: the settings for the project, as shown below:
Here Insert Picture Description
explain here the difference between two public key:
present in the cloud code project public key, only cloning provide user permissions, i.e., only to the local cloned by git, read and write can not be present in the code cloud personal settings in the public key can be read and more privileges.
PS: our own projects generally add the keys in the personal settings.

3. Create a public

Git code provides cloud services based SSH protocol, before accessing the warehouse warehouse using the SSH protocol, you need to configure SSH public good account / warehouse. (To code the code cloud cloud cloned into the local repository, it needs to Git, if the shoes do not understand your own Git Baidu)
we use the Bash Git window open command, the command is generated by sshkey:

ssh-keygen -t rsa -C "[email protected]"

Here's mailbox can fill in the code of cloud email account.
Follow the prompts to complete the three-carriage return, you can generate ssh key. By looking at ~ / .ssh / id_rsa.pub file contents, access to your public key

cat ~/.ssh/id_rsa.pub
# ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6eNtGpNGwstc....

As shown in Figure:
Here Insert Picture Description
Finally, copy the public key to the public key in the code cloud (during the addition will let you enter the code cloud account password, which is the code in the cloud to your local authorized operator):
Here Insert Picture Description

4. The item code cloud cloned into local

Need to create a clone of a local folder:
copy the good code in SSH cloud project address;
in the right file folder Git Bash Here, the pop-up command window, type in the window

git clone SSHURL

The project can be cloned into the folder.
(Personal conclusion: the cloud is actually a number of people free cloud storage, like SVN or GIT as project management can be carried out, we have to use the code cloud project management, you need to rely on Git, so, we create code in the cloud the project, if you want a computer in the management of this project, then we will need to generate a public computer via Git, add this computer's public key to the public key code in the cloud, adding the process need to enter code cloud user password, it is to this computer is authorized to operate, after a successful showing this computer to read and write authorization code has been cloud, this computer can be operated cloud cloned code repository directly locally.)

Published 14 original articles · won praise 2 · Views 802

Guess you like

Origin blog.csdn.net/breakaway_01/article/details/103256032