A startup company builds a GIT private library in ten minutes and a git private library in ten minutes
Please pay attention to the public accounts of the old rural codoon. sync with the CSDN blog. I. There are not many developers in the background companies. It is troublesome to build gitlab, you only need to create a simple git shared library on the Server. 2. Create a repository Server: 1. Create a project directory on the Server. Mkdir sample2. Execute git-bare init in the sample to generate the sample. git Directory, which is a shared library and all the code is in this directory. Local: 1. clone remote shared library. It is still empty: git clone user @ server:/home/project/sample. git2. Generate the sample folder locally. Currently, the folder is empty. 3. add the file under sample and commit it. You may be prompted to configure user and mail during commit. Set as prompted. 4. push to the remote end. The push process may prompt that the corresponding branch of the remote track does not exist. Follow the prompts to set git-set-upstream, which is on the master branch by default. 3. After the above configuration is complete, you need to enter the ssh connection password every time you run pull or push (because the underlying layer executes the ssh command to connect to the remote end), which is very troublesome, you need to establish a trust relationship. 1. server creation ~ /. Ssh folder. The permission must be 700. Create the authorized_keys file in the. ssh directory. The permission must be 600. 2. Generate the private key and Public Key locally, and add the public key to authorized_keys.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.