Recently I'm trying to use repo to download private android codes from vendors. They provided me with the .netrc and gitconfig like:
...
[protocol]
version = 2
[url "https://private.xxx.yyy.cn"]
insteadOf = ssh://git.xxx.org:9222
...
I think it works because under above config, I can repo init -u https://private.xxx.yyy.cn/private_PROJECT/manifest.xml -m ABC.xml successfully but failed without above config.
However, when I repo sync -c --no-tags -j4, it will report warning:
Fetching: 0% (0/763) warming up
Invalid clone.bundle file; ignoring
Invalid clone.bundle file; ignoring
I searched above warnings and I think maybe this warning doesn't matter but when I run repo status and current folder has only .repo but nothing else!
project art/
missing (run "repo sync")
project build/blueprint/
missing (run "repo sync")
project build/make/
missing (run "repo sync")
project cts/
missing (run "repo sync")
project dalvik/
missing (run "repo sync")
Then I checked .repo/manifests/ABC.xml:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="ssh://git.xxx.org:9222/private_PROJECT/" name="caf" review="codeaurora.org"/>
I noticed that in the manifest.xml, remote fetch pointed to original url instead of the proxy url, so I tried to update this xml with the proxy url.Then I tried to repo init & repo sync again.
Before update manifest.xml cat projects/art.git/config:
...
[remote "caf"]
url = ssh://git.xxx.org:9222:9222/private_Project/platform/art
review = codeaurora.org
projectname = platform/art
fetch = +refs/heads/*:refs/remotes/caf/*
After update manifest.xml cat projects/art.git/config:
[remote "caf"]
url = https://xxx.yyy.cn/private_Project/platform/art
review = codeaurora.org
projectname = platform/art
fetch = +refs/heads/*:refs/remotes/caf/*
It seems that it will work! Unluckily, still not work.
So I tried to just git clone url = https://xxx.yyy.cn/private_Project/platform/art or git clone ssh://git.xxx.org:9222:9222/private_Project/platform/art, I can pulled it.
I also tried to repo sync platform/art -c --no-tags -j4, it can also pulled it.
But there are almost 1000 sub-project in android, I don't want to run such cmd for each sub-project or work around such as creating a script. I want to know the reason why repo sync doesn't work here.
So, can anyone help me to figure it out?