Table of Contents
A simple introduction to building your own repo server
Home Backend Development PHP Tutorial A simple introduction to building your own repo server_PHP tutorial

A simple introduction to building your own repo server_PHP tutorial

Jul 12, 2016 am 09:04 AM
android

A simple introduction to building your own repo server

This article is mainly used as a study note, and I also hope it can help other friends in need

First of all, thank you to the following Guidance for this article:

http://blog.csdn.net/hansel/article/details/9798189
http://blog.csdn.net/lb5761311/article/details/47723455
http://bbs.mfunz.com/thread-1015705-1-1.html
http://blog.csdn.net/sunweizhong1024/article/details/8055372
http://blog.csdn .net/itleaks/article/details/30021395?utm_source=tuicool&utm_medium=referral


Text--repo complete installation and project synchronization


1. Download repo bootstrap (repo Startup file for installing the complete repo)

  1. git clone git://git.omapzoom.org/git-repo.git
clone After completion, the repo bootstrap file is located in the following path:

  1. ./git-repo/repo


2. Install repo bootstrap

a. Create local repo

  1. mkdir ~/bin/
  2. cp ./git-repo/repo ~/bin/

b. Set environment variables:

  1. vi ~/.profile
Make sure there are the following three lines

  1. if [ -d "$HOME/bin" ] ; then
  2. PATH="$HOME/bin:$PATH"
  3. fi

c. Make the environment variables take effect

  1. source ~/.profile
Make the bin path take effect, and you can directly execute the command line repo in the future


3. patch repo bootstrap

  1. vi ~/bin/repo
Make changes according to the following diff

  1. -- REPO_URL = 'https://gerrit.googlesource.com/git-repo'
  2. REPO_URL = 'git://codeaurora.org/tools/repo.git'
This step must be done, otherwise in step 4, the repo URL download timeout problem will appear in the following log:

  1. fatal: Cannot get https ://gerrit.googlesource.com/git-repo/clone.bundle
  2. fatal: error [Errno 101] Network is unreachable
The timeout is because gerrit.googlesource.com was The wall is blocked


4. Create the project manifest, and the repo will synchronize the project with the configuration in the manifest

a. Create an empty manifest.git warehouse on the server, here it is as follows Take the remote url address as an example:

  1. cd manifest.git
  2. git remote -v
  3. origin git:manifest (fetch)
  4. origin git:manifest (push)

b. Clone the manifest repository on the client

  1. git clone git:manifest

c. Create the default.xml file. The repo will use the default.xml of the manifest warehouse as the configuration file by default

  1. cd manifest
  2. vi default.xml
Enter the following content:



  1. fetch="git:"
  2. review="https://android-review.googlesource.com/" / >
  3. remote="origin"
  4. sync-j="4" />




The manifest configuration is divided into three parts: remote default and project, which are explained separately

remote:
refers to a server address of the synchronization project (there can be multiple remotes)
name is A uniquely identifiable name
fetch is the prefix of the URL. In our example, the warehouse path is all git:XXX, so the prefix is ​​"git:"
review can be ignored for the time being. In the example Whichever

default:
refers to the default server configuration used by the synchronization project:
revision refers to the name of the git branch
remote refers to the remote server used
sync-j means The number of parallel projects when synchronizing projects

project:
refers to the git warehouse of the synchronized project. Here we assume that we have a git:test warehouse (there can be multiple)
name is the git warehouse name test
Path is to set the directory where the warehouse is stored in the repo project. Here it is directly set to be stored in the test subdirectory of the repo project

d. Synchronize the modification of default.xml to the server

  1. git add default.xml
  2. git commit -m "udpate default.xml for repo sync test"
  3. git push origin master


5. Install the full version repo

a. First create and enter a custom directory:

  1. mkdir test-project
  2. cd test-project

b. Execute the following repo command to initialize the repo, and specify the mainfest project list

  1. repo init - u git:manifest

c. After execution, there will be the following log. Here is the real cloned full version of the repo:

  1. Get git://codeaurora.org/tools/repo.git
  2. remote: Counting objects: 3425, done.
  3. remote: Total 3425 (delta 0), reused 0 (delta 0)
  4. Receiving objects: 100% (3425/3425), 753.71 KiB, done.
  5. Resolving deltas: 100% (2311/2311), done.
  6. From git://codeaurora.org/tools/repo
  7. * [new branch] aosp-new/maint -> origin/aosp-new/maint
  8. * [new branch] aosp-new /master -> origin/aosp-new/master
  9. * [new branch] aosp-new/stable -> origin/aosp-new/stable
  10. * [new branch] caf-stable -> origin/caf-stable
  11. * [new branch] master -> origin/master
  12. * [new branch] stable -> origin/stable
  13. * [new tag] v1.0 -> v1.0
  14. * [new tag] v1.0.1 -> v1.0.1
  15. ......
  16. Getting manifest . ..
  17. from git:manifest
  18. remote: Counting objects: 18, done.
  19. remote: Compressing objects: 100% (16/16), done.
  20. remote: Total 18 (delta 4), reused 0 (delta 0)
  21. Unpacking objects: 100% (18/18), done.
  22. From git:manifest
  23. * [new branch] master -> origin/master

d. Next, you will be asked to initialize the repo account information. The example is consistent with git, for example, as follows, brackets is the git account information,
just enter the same information after the colon:

  1. Your Name [willqian]: willqian
  2. Your Email [690004467 @qq.com]: 690004467@qq.com
  3. Your identity is: willqian
  4. is this correct [y/n]? y

e. At this time, there will be a hidden folder .repo in the directory. The full version of the repo is located in the path

  1. .repo/repo/


6. repo synchronization project

a. Synchronization

  1. cd test-project
  2. repo After sync
is completed, you can see through the log that the test warehouse listed in the manifest project list has been cloned
We entered the test warehouse to view and found that there was a problem. no branch status

  1. cd test
  2. git status
  3. # Not currently on any branch.
  4. nothing to commit (working directory clean)

b. Cut to the master branch

  1. cd test-project
  2. repo start master --all
Through this operation, we entered the test warehouse again and saw that it was on the master branch

  1. cd test
  2. git status
  3. # On branch master
  4. nothing to commit (working directory clean)


At this point, the complete installation of the repo and the example of project synchronization To complete

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1075900.htmlTechArticleBuilding your own repo server is a simple introduction. This article is mainly used as a study note, and I also hope it can help others. Friends in need would first like to thank the following articles for their guidance:...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

New report delivers damning assessment of rumoured Samsung Galaxy S25, Galaxy S25 Plus and Galaxy S25 Ultra camera upgrades New report delivers damning assessment of rumoured Samsung Galaxy S25, Galaxy S25 Plus and Galaxy S25 Ultra camera upgrades Sep 12, 2024 pm 12:23 PM

In recent days, Ice Universe has been steadily revealing details about the Galaxy S25 Ultra, which is widely believed to be Samsung's next flagship smartphone. Among other things, the leaker claimed that Samsung only plans to bring one camera upgrade

Samsung Galaxy S25 Ultra leaks in first render images with rumoured design changes revealed Samsung Galaxy S25 Ultra leaks in first render images with rumoured design changes revealed Sep 11, 2024 am 06:37 AM

OnLeaks has now partnered with Android Headlines to provide a first look at the Galaxy S25 Ultra, a few days after a failed attempt to generate upwards of $4,000 from his X (formerly Twitter) followers. For context, the render images embedded below h

IFA 2024 | TCL\'s NXTPAPER 14 won\'t match the Galaxy Tab S10 Ultra in performance, but it nearly matches it in size IFA 2024 | TCL\'s NXTPAPER 14 won\'t match the Galaxy Tab S10 Ultra in performance, but it nearly matches it in size Sep 07, 2024 am 06:35 AM

Alongside announcing two new smartphones, TCL has also announced a new Android tablet called the NXTPAPER 14, and its massive screen size is one of its selling points. The NXTPAPER 14 features version 3.0 of TCL's signature brand of matte LCD panels

Vivo Y300 Pro packs 6,500 mAh battery in a slim 7.69 mm body Vivo Y300 Pro packs 6,500 mAh battery in a slim 7.69 mm body Sep 07, 2024 am 06:39 AM

The Vivo Y300 Pro just got fully revealed, and it's one of the slimmest mid-range Android phones with a large battery. To be exact, the smartphone is only 7.69 mm thick but features a 6,500 mAh battery. This is the same capacity as the recently launc

New report delivers damning assessment of rumoured Samsung Galaxy S25, Galaxy S25 Plus and Galaxy S25 Ultra camera upgrades New report delivers damning assessment of rumoured Samsung Galaxy S25, Galaxy S25 Plus and Galaxy S25 Ultra camera upgrades Sep 12, 2024 pm 12:22 PM

In recent days, Ice Universe has been steadily revealing details about the Galaxy S25 Ultra, which is widely believed to be Samsung's next flagship smartphone. Among other things, the leaker claimed that Samsung only plans to bring one camera upgrade

Samsung Galaxy S24 FE billed to launch for less than expected in four colours and two memory options Samsung Galaxy S24 FE billed to launch for less than expected in four colours and two memory options Sep 12, 2024 pm 09:21 PM

Samsung has not offered any hints yet about when it will update its Fan Edition (FE) smartphone series. As it stands, the Galaxy S23 FE remains the company's most recent edition, having been presented at the start of October 2023. However, plenty of

Motorola Razr 50s shows itself as possible new budget foldable in early leak Motorola Razr 50s shows itself as possible new budget foldable in early leak Sep 07, 2024 am 09:35 AM

Motorola has released countless devices this year, although only two of them are foldables. For context, while most of the world has received the pair as the Razr 50 and Razr 50 Ultra, Motorola offers them in North America as the Razr 2024 and Razr 2

Xiaomi Redmi Note 14 Pro Plus arrives as first Qualcomm Snapdragon 7s Gen 3 smartphone with Light Hunter 800 camera Xiaomi Redmi Note 14 Pro Plus arrives as first Qualcomm Snapdragon 7s Gen 3 smartphone with Light Hunter 800 camera Sep 27, 2024 am 06:23 AM

The Redmi Note 14 Pro Plus is now official as a direct successor to last year'sRedmi Note 13 Pro Plus(curr. $375 on Amazon). As expected, the Redmi Note 14 Pro Plus heads up the Redmi Note 14 series alongside theRedmi Note 14and Redmi Note 14 Pro. Li

See all articles