2.repo sync 源碼出現(xiàn)錯(cuò)誤部分解決方法

repo sync
出現(xiàn)錯(cuò)誤
error: .repo/manifests/: contains uncommitted changes
解決方法:
de>cd .repo/manifests
git stash
git clean -f -d

repo sync中途出現(xiàn)error: error: Exited sync due to fetch errors
解決方法:
repo sync -jx -f --force-sync x的數(shù)值根據(jù)你電腦的配置來(lái)決定

Fetching projects: 100% (228/228), done.

Checking out files: 100% (18905/18905), done. files: 23%
(4359/18905)
Checking out files: 100% (4664/4664), done.
Checking out files: 100% (9386/9386), done.out files: 0% (2/9386)
Checking out files: 100% (5365/5365), done.
Checking out files: 100% (292/292), done.g out files: 5% (16/292)
Checking out files: 100% (41/41), done.ing out files: 4% (2/41)
Syncing work tree: 35% (80/228) fatal: This operation must be run in
a work tree
Traceback (most recent call last):
File "/home/christian/Documents/yum/.repo/repo/main.py", line 366,
in <module>
_Main(sys.argv[1:])
File "/home/christian/Documents/yum/.repo/repo/main.py", line 346,
in _Main
result = repo._Run(argv) or 0
File "/home/christian/Documents/yum/.repo/repo/main.py", line 137,
in _Run
result = cmd.Execute(copts, cargs)
File "/home/christian/Documents/yum/.repo/repo/subcmds/sync.py",
line 443, in Execute
project.Sync_LocalHalf(syncbuf)
File "/home/christian/Documents/yum/.repo/repo/project.py", line
975, in Sync_LocalHalf
self._InitWorkTree()
File "/home/christian/Documents/yum/.repo/repo/project.py", line
1758, in _InitWorkTree
raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree

運(yùn)行以下命令:

repo --trace sync -l

如果還報(bào)錯(cuò),就刪掉最后一個(gè)報(bào)錯(cuò)的文件
rm -rf xxxxxxxxxx

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容