Skip to content

Instantly share code, notes, and snippets.

@mvmaasakkers
Last active August 29, 2015 14:01
Show Gist options
  • Save mvmaasakkers/95b87c76cefbb110c7e7 to your computer and use it in GitHub Desktop.
Save mvmaasakkers/95b87c76cefbb110c7e7 to your computer and use it in GitHub Desktop.
This script go get's package from a private repo. This is currently not possible with go get itself, but the workaround is pretty easy
# Usage: goget.sh [package]
# Example: goget.sh bitbucket.org/username/repo
# This script relies on keys being set correctly and $GOPATH being available
mkdir -p $GOPATH/src/$1
git clone git://$1 $GOPATH/src/$1
go get $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment