2021-09-18 Android repo 镜像服务器搭建
一、repo 鏡像服務器搭建大概是這樣。
?二、下面我們就來學習一下這個流程。
? ? ? ? 1、下面是在遠程的服務器端有個名稱叫repo-server的repo倉庫。
?? ? ? ? 2、在客戶端下載鏡像,init ,后面加--mirror,執行repo init ?--repo-url=ssh://git@172.16.90.11/home/git/tmp/repo-server/repo.git ? ?-u ssh://git@172.16.90.11/home/git/tmp/repo-server/manifests.git ? -m ?longor.xml ?--mirror
? ? ? ? ? ? 在.repo 下面生成 manifests ?manifests.git ?manifest.xml ?repo
??? ? ? ? 3、執行repo sync 同步,你會發現下的的文件都是.git 類型,其實就跟服務器的上的文件是一樣的。
?4、如果使用repo init ?--repo-url=ssh://git@172.16.60.10/home/git/tmp/repo-server/repo.git ? ?-u ssh://git@172.16.60.10/home/git/tmp/repo-server/manifests.git ? -m ?longor.xml,不后面不帶--mirror,從下圖可以看出,repo sync后是把代碼都下下來了。
?5、repo init 后面加?--mirror和不加的區別在哪里呢,為啥repo sync后不一樣的效果呢?貓膩在.repo\manifests.git\config文件里面
?三、完成上面就搞好服務器鏡像了,現在我們把代碼從服務器上download下來。
? ? ? ?1、新建一個download_code文件夾。
? ? ? ?2、執行repo init ?--repo-url=/home/wfh/tmp/mirror/repo.git ? ?-u /home/wfh/tmp/mirror/manifests.git ? -m ?longor.xml
? ? ? ?3、然后repo sync
? ? ? ?4、實際運行效果圖,可以看到服務器端成功拉取代碼。
總結
以上是生活随笔為你收集整理的2021-09-18 Android repo 镜像服务器搭建的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 安全问题层出不穷 加密手机悄然兴起
- 下一篇: android动态mac地址,Andro