Configure git Service operations in Ubuntu

Source: Internet
Author: User
Configure git Service operations in Ubuntu 1. prepare related software 1.1 prepare necessary ssh tools for easy logon and ssh authentication: www.2cto. com1 $ sudoapt-getinstallopenssh-client2 $ sudoapt-getinstallopenssh-server1.2 preparation... configure git Service operations in Ubuntu 1. prepare related software 1.1 prepare necessary ssh tools for easy logon and ssh authentication: www.2cto.com 1 $ sudo apt-get install openssh-client2 $ sudo apt-get install openssh-server 1.2 prepare necessary git tools pay attention to building dedicated users for control, such as the following two commands: 1 $ sudo apt-get install git-core 2 $ sudo useradd git3 $ sudo passwd git www.2cto.com 2. create a blank repository on the server side 1 $ mkdir-p gitRepo/project. git # Create a required project folder 2 $ git -- bare init gitRepo/project. git # initialize a blank Repository 3. initialize the repository on the client and submit code $ cd project $ git init $ git add. $ git commit-am "init the repo" $ git remote add origin user @ ip:/path/to/project. git # set the remote repository path $ git push origin master # submit the first version of code. note: If there is a problem with the remote repository path, you can use the git config command to correct it. for example: 1 $ git config remote. origin. url # view the currently set path 2 $ git config remote. origin. url user @ ip:/path/to/project. git # change the current path to the latter. 4. start collaboration. other users can cooperate through git clone directly. for example: $ git clone user @ ip: /path/to/project. git local_project_name source http://www.cnblogs.com/QuLory/archive/2013/01/21/2869108.html

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.