Reputation: 4089
senario:
1) we're in China, so access github is slow and sometimes impossible, and as u know, we can't live w/out github.
2) when developing iOS projects, we use Cocoapods, and it uses a lot github repos, so when installing pods, many command like git clone [email protected]/reactivecocoa/ReactiveCocoa
will be triggered.
so is there any way can we improve this process? the best solution to me seems to make a local cache of these github repos, when triggering git clone [email protected]/reactivecocoa/ReactiveCocoa
it's actually triggering git clone http://192.168.1.199/repos/reactivecocoa/ReactiveCocoa
, and the server can tell if certain pod exists, if yes return the cached, else make a github request and cache the result.
but can't find a workable strategy to achieve this, any suggestions?
Upvotes: 5
Views: 1813
Reputation: 5875
git config --global url."[email protected]:reactivecocoa/ReactiveCocoa".insteadOf "http://192.168.1.199/repos/reactivecocoa/ReactiveCocoa"
Upvotes: 3