clone Submodule
- 下载代码时使用
git clone https://github.com/android-hacker/VirtualXposed.git --recursive
- 先clone父项目,再初始化Submodule.
git clone https://github.com/android-hacker/VirtualXposed.git
cd VirtualXposed\VirtualApp\launcher
git submodule init
git submodule update
但是对VirtualXposed, 这两种方法都会报错, 错误是
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:android-hacker/Launcher3.git' into submodule path 'E:/reverseEngineer/VX/VirtualXposed/VirtualApp/launcher' failed
Failed to clone 'VirtualApp/launcher'. Retry scheduled
Cloning into 'E:/reverseEngineer/VX/VirtualXposed/VirtualApp/launcher'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
这里的错误原因是因为使用了git@github.com:android-hacker/Launcher3.git
, 非此项目拥有者没有权限. 我们需要用https://github.com/android-hacker/Launcher3.git
替代. 找到.git/config
和.gitmodules
文件, 修改后即可正常clone代码.
参考资料:
https://segmentfault.com/a/1190000003076028
fastio/pedis#6