<pclass="lead"> This server implements <ahref="https://golang.org/cmd/go/#hdr-Remote_import_paths">remote import paths</a> for use by the <ahref="https://golang.org/cmd/go/">go tool</a>. </p>
<h2>Adding a repository</h2>
<p>
The first step is to obtain an api key. Visit the <ahref="/_static/register/">registration page</a>
and follow the instructions to obtain a key.
</p>
<p> Let's say you've got some code hosted at <code>https://git.example.com/user/foo</code> that you'd like to publish with <code>/me/foo</code>. Armed with the token you previously obtained (e.g. <code>c033-b79f-7fa1</code>) </p>
<p> The <ahref="https://golang.org/cmd/go/#hdr-Download_and_install_packages_and_dependencies">go tool</a> doesn't need any modification in order to work, e.g. if vain is hosted on <code>https://go.example.com</code>: </p><pre>$ go get go.example.com/foo</pre>
<p> should just work. A possible wrinkle is if the site is not hosted using TLS. In which case please encrypt your site. If this is impossible and you're not concerned with adversarial manipulation of your source (as would perhaps be the case during development) you can tell the go tool to run in insecure mode. Use with caution. </p>