Using Go With Kiln


Go has its own built-in mechanism, go get, to install packages and dependencies. Kiln can be used to host these in a Git repository with a few small adjustments.

First, make sure you are set up to use Kiln with SSH.

Next, configure your git environment with a URL redirect, substituting the name of your Kiln On Demand site:
git config --global url."ssh://[site]@[site]".insteadOf "git://[site]"

Finally, make sure you have a Git repository in Kiln that has the package you’re looking for!

This will let you download your package like so:
go get [site][group]/[repository].git

Note: The git configuration can be changed to include the “Repositories” portion of the path, or even the group, to use as a shortcut. For example:

git config --global url."ssh://[site]@[site][group]".insteadOf "git://[site]"

Will let you use:

go get [site][repository].git