Local git configuration under Gitlab management

Source: Internet
Author: User
Tags using git git shell

The company project group uses Gitlab, the group members are assigned to have a fixed git personal account, different members have different editing rights of the module, need to configure the local git before use. For the side dishes that have been using SVN, this still needs a little bit of configuration to be used. To configure the Githost process:

    1. Add the host address specified by the project group to the local host file, then access the project address according to this address, enter the user name and password can enter the dashboard, which has its own permissions under the various directories, to clone to the local need to continue the following operations.
    2. Local git, configure environment variables, add bin to path. Git: Https://git-scm.com/download/win
    3. If you are not accustomed to the command line want to use the graphical interface, you can install Tortoisegit. : https://tortoisegit.org/download/
    4. Git is already installed on it, the Git shell is open, there's a shortcut on the desktop, or you can right-click Git bash. Local use SSH command to generate the key (there are steps below), the target folder is C:\Users\Administrator\.ssh, the contents of the id_rsa.pub copied out to paste in our project SSH keys settings
    5. and copy the config file of the project group to C:\USERS\ADMINISTRATOR\.SSH so that the project of remote repository can be obtained locally using Git clone.
    6. Configure the above, you can set up a local folder to hold the project will be clone, after the clone is completed, right-click on the folder under the Turtoisegit should be automatically linked, you can also use the GUI for branch switch.
Take GitHub For example: git configures SSH public key 1 on Windows. Install git and open "Git Bash" 2 from the program directory. Type the command: ssh-keygen-t rsa-c [email protected] "[email protected]" is a GitHub account 3. Remind you to enter the name of the key, such as ID_RSA4. Two files are generated under C:\Documents and settings\administrator\: Id_rsa and ID_RSA.PUB5. Copy the key file generated in 4 into the C:\Documents and settings\administrator\.ssh\ directory. 6. Open the Id_rsa.pub file with Notepad, copy the content, on the github.com website to SSH Key Management page, add a new public key, just take a name, paste the contents of the copy.Note that the key file generated in step 2 is in the root directory of the current user and must be placed in the ". SSH" Directory of the current user directory to take effect. You can only enter create "." On the command line in Windows. The beginning of the folder. The command is mkdir. SSHBenefits: Two better git tutorials: Easy to use: A concise git tutorial full detail: Pro git Simplified Chinese version

Local git configuration under Gitlab management

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.