This server implements remote import paths for use by the go tool.
The first step is to obtain an api key. Visit the registration page and follow the instructions to obtain a key.
Let's say you've got some code hosted at https://git.example.com/user/foo
that you'd like to publish with /me/foo
. Armed with the token you previously obtained (e.g. c033-b79f-7fa1
)
$ export TOKEN=c033-b79f-7fa1 $ curl -i -H "Authorization: Bearer $TOKEN" -d '{"repo": "https://git.example.com/user/foo"}' https://vain/me/foo
Using the appropriate token for the route you want to delete:
$ curl -i -H "Authorization: Bearer $TOKEN" -X DELETE https://vain/me/foo
The go tool doesn't need any modification in order to work, e.g. if vain is hosted on https://go.example.com
:
$ go get go.example.com/foo
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.