Uploading packages by Go
To upload a module to your account, use the Git builder:
# Initial one-time setup $ git remote add fury https://git.fury.io/USERNAME/PACKAGE-NAME.git # Push to build a new version $ git push fury master Username for 'https://git.fury.io': <Your personal username> Password for 'https://firstname.lastname@example.org': <Your personal password>
USERNAME in the path of your
git.fury.io repository URL is the destination of the build, however, the username and password for authentication are your account credentials. Usually the former is your team account, and the latter is a personal one.
Go Modules on Gemfury are versioned with Semantic Versioning scheme derived from the tags of your Git repo. To release a new version, create a tag and push it to the Gemfury repo:
$ git tag v1.1.8 $ git push --tags fury master
Your Repository URL
The repository URL is the Go Modules proxy URL for your Gemfury account and packages. Do not share this URL to keep your account private. Your Repo-URL has the following format:
When accessing only public packages in your Gemfury account, you do not need to specify a token in the Repo-URL:
Install Go Modules from Gemfury
Go uses a central proxy to collect a project’s dependencies. By default, it is configured to the public proxy run by Go’s patron-company (Google).
Set the following environment variables to configure Go to use Gemfury. This can be done in your terminal before running
go or in a start-up shell script like
$ export GOPROXY=https://TOKEN@go-proxy.fury.io/USERNAME/ $ export GOPRIVATE="git.fury.io/USERNAME/*" $ export GONOPROXY=none
Please note that
GOPRIVATE specifies the match pattern for the names of your private modules, and does not have to match your “fury.io” Repo-URL. Adjust it to match the names of modules you upload to Gemfury.
Once you have this configuration in place, start your build:
$ go build ./...
Currently, Go Modules support is in Beta. Please contact us with issues or suggestions.
Go does not support splitting public and private requests between two proxies. ↩︎