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].kilnhg.com:".insteadOf "git://[site].kilnhg.com/"
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].kilnhg.com/Repositories/[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].kilnhg.com/Repositories/[group]".insteadOf "git://[site].kilnhg.com/"
Will let you use:
go get [site].kilnhg.com/[repository].git