


A simple introduction to building your own repo server_PHP tutorial
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 needFirst 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)
- git clone git://git.omapzoom.org/git-repo.git
- ./git-repo/repo
2. Install repo bootstrap
a. Create local repo
- mkdir ~/bin/
- cp ./git-repo/repo ~/bin/
b. Set environment variables:
- vi ~/.profile
- if [ -d "$HOME/bin" ] ; then
- PATH="$HOME/bin:$PATH"
- fi
c. Make the environment variables take effect
- source ~/.profile
3. patch repo bootstrap
- vi ~/bin/repo
- -- REPO_URL = 'https://gerrit.googlesource.com/git-repo'
- REPO_URL = 'git://codeaurora.org/tools/repo.git'
- fatal: Cannot get https ://gerrit.googlesource.com/git-repo/clone.bundle
- fatal: error [Errno 101] Network is unreachable
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:
- cd manifest.git
- git remote -v
- origin git:manifest (fetch)
- origin git:manifest (push)
b. Clone the manifest repository on the client
- 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
- cd manifest
- vi default.xml
-
- fetch="git:"
- review="https://android-review.googlesource.com/" / >
- remote="origin"
- 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
- git add default.xml
- git commit -m "udpate default.xml for repo sync test"
- git push origin master
5. Install the full version repo
a. First create and enter a custom directory:
- mkdir test-project
- cd test-project
b. Execute the following repo command to initialize the repo, and specify the mainfest project list
- repo init - u git:manifest
c. After execution, there will be the following log. Here is the real cloned full version of the repo:
- Get git://codeaurora.org/tools/repo.git
- remote: Counting objects: 3425, done.
- remote: Total 3425 (delta 0), reused 0 (delta 0)
- Receiving objects: 100% (3425/3425), 753.71 KiB, done.
- Resolving deltas: 100% (2311/2311), done.
- From git://codeaurora.org/tools/repo
- * [new branch] aosp-new/maint -> origin/aosp-new/maint
- * [new branch] aosp-new /master -> origin/aosp-new/master
- * [new branch] aosp-new/stable -> origin/aosp-new/stable
- * [new branch] caf-stable -> origin/caf-stable
- * [new branch] master -> origin/master
- * [new branch] stable -> origin/stable
- * [new tag] v1.0 -> v1.0
- * [new tag] v1.0.1 -> v1.0.1
- ......
- Getting manifest . ..
- from git:manifest
- remote: Counting objects: 18, done.
- remote: Compressing objects: 100% (16/16), done.
- remote: Total 18 (delta 4), reused 0 (delta 0)
- Unpacking objects: 100% (18/18), done.
- From git:manifest
- * [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:
- Your Name [willqian]: willqian
- Your Email [690004467 @qq.com]: 690004467@qq.com
- Your identity is: willqian
- 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
- .repo/repo/
6. repo synchronization project
a. Synchronization
- cd test-project
- repo After sync
We entered the test warehouse to view and found that there was a problem. no branch status
- cd test
- git status
- # Not currently on any branch.
- nothing to commit (working directory clean)
b. Cut to the master branch
- cd test-project
- repo start master --all
- cd test
- git status
- # On branch master
- nothing to commit (working directory clean)
At this point, the complete installation of the repo and the example of project synchronization To complete

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

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

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

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

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

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 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 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

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
