Git, as a version management artifact, is naturally indispensable in daily work, especially with Android, GitHub and Google. Many times, however, it is necessary to use Git to clone a remote code base, which is notoriously inaccessible to Google and the Android website. So how do we clone a library like: Android.googlesource.com?
Tools: Git, VPN proxy
Example:git clone https://android.googlesource.com/platform/frameworks/volley/
d:\androidstudioprojects> git clone https://android.googlesource.com/platform/frameworks/volley/ 'volley'https://android.googlesource.com/platform/ frameworks/volley/': Failed connect to android.googlesource.com:443; No Error
Failed Connect to android.googlesource.com:443 it was obviously due to the wall. So what do we do? The first thing to think about is VPN, if you need to have a VPN.
Set up a GIT proxy
" localhost:1080 "
Run again
git clone https://android.googlesource.com/platform/frameworks/volley/
You can now see the following results
d:\androidstudioprojects> git clone https://android.googlesource.com/platform/frameworks/volley/Cloning into'Volley'... remote:counting objects:Bayi, Doneremote:finding Sources: -% (Bayi/Bayi) Receiving objects: -% (2953/2953),1.16MiB |23.00KIB/S, Done. Remote:total2953(Delta263), reused2953(Delta263) r/263) Resolving deltas: -% (263/263), Done. Checking Connectivity ... Done.
Android development, no VPN Why do you call me love?
Git cannot clone remote code base and Git proxy settings