Another possibility for when the pub repository is not reachable (because you have no Internet access or work behind a very strict firewall) is to host your own private pub mirror.
How to do it...
Follow these steps to host your own private pub mirror:
You need a server that speaks to the pub's HTTP API. Documentation on that standalone API does not yet exist, but the main pub server running at pub.dartlang.org is open source with its code living at https://github.com/dart-lang/pub-dartlang. To run the server locally, go through these steps:
Install the App Engine SDK for Python.
Verify that its path is in $PATH.
Install the pip installation file, beautifulsoup4, and pycrypto webtest packages.
From the top-level directory, ...
With Safari, you learn the way you learn best. Get unlimited access to videos, live online training,
learning paths, books, interactive tutorials, and more.