Cloudsmith Documentation Hub

Welcome to the Cloudsmith Documentation Hub. You'll find comprehensive guides and documentation to help you start working with Cloudsmith as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Go Registry

Cloudsmith provides public & private registries for Go

Go, also known as Golang, is an open source programming language designed at Google

For more information on Go, please see:

  • Go: The official website for Go language
  • Go Packages: Officially supported Go packages
  • GoDoc: Documentation/search for Community Go packages
Contextual Documentation

The examples in this document are generic. Cloudsmith provides contextual setup instructions within each repository, complete with copy n' paste snippets (with your namespace/repo pre-configured).

In the following examples:




Your Cloudsmith account name or organisation name (namespace)


Your Cloudsmith Repository name (also called "slug")


Your Cloudsmith Entitlement Token (see Entitlements for more details)


Your Cloudsmith username


Your Cloudsmith password


Your Cloudsmith API Key


The name of your package


The version number of your package

Upload a Package

To upload, you need to generate a module first. While we expect the tooling in this area to improve over time, currently the process is a manual one and can be a little tricky.

You can build a module with standard command-line tooling like zip and git. To illustrate the process we'll use logrus as an example:

First, we'll create the correct directory structure and check out the version of logrus we want to pack (v1.4.2 for example purposes):

mkdir -p[email protected]
git clone [email protected]:sirupsen/logrus.git[email protected]
cd[email protected]
git checkout v1.4.2

Next (and finally) we need to clean up and pack the module. We only want to include folders with files in them, so we'll use find:

rm -rf .git/
cd ../../../
find -type f | while read f; do zip "$f"; done


Please see Russ Cox's Go Modules overview for full information on building your own modules.

Upload via the Cloudsmith CLI

For full details of how to install and setup the Cloudsmith CLI, see Command Line Interface.

The command to upload a Go module via the Cloudsmith CLI is:

cloudsmith push go OWNER/REPOSITORY


cloudsmith push go org/repo

Upload via Cloudsmith Website

Please see Upload a Package for details of how to upload via the Website UI.

Example Project

For examples of what your project should look like for packaging and publishing/uploading, please have a look at our examples repository (on GitHub). We'll supplement these with more detailed guidance later but otherwise, just ask - we're here to help!

Download a Package


Before you can install modules from your Cloudsmith repository you'll need to configure your environment for access. The configuration is defined using the GOPROXY environment variable.


Cloudsmith Go repositories don't (currently) proxy upstream sources, and so can only serve modules which have been explicitly pushed. If you require the ability to pull modules from public/upstream sources then you must use Go 1.13 or greater to avail of the fallback repository support.

Public Repositories

To define the GOPROXY environment variable for a public Cloudsmith repository:

Linux / Mac

export GOPROXY=,,direct

Windows (cmd)

set GOPROXY=,,direct

Windows (Powershell)


Private Repositories


Private Cloudsmith repositories require authentication. You can choose between two types of authentication, Entitlement Token Authentication or HTTP Basic Authentication.

The setup method will differ depending on what authentication type you choose to use.


Entitlement Tokens, User Credentials and API-Keys should be treated as secrets, and you should ensure that you do not commit them in configurations files along with source code or expose them in any logs

To define the GOPROXY environment variable for a private Cloudsmith repository:

Linux / Mac

export GOPROXY=,,direct
export GOPROXY=https://USERNAME:[email protected]/basic/OWNER/REPOSITORY/go/,,direct
export GOPROXY=https://USERNAME:[email protected]/basic/OWNER/REPOSITORY/go/,,direct
export GOPROXY=https://token:[email protected]/basic/OWNER/REPOSITORY/go/,,direct

Windows (cmd)

set GOPROXY=,,direct
set GOPROXY=https://USERNAME:[email protected]/basic/OWNER/REPOSITORY/go/,,direct
set GOPROXY=https://USERNAME:API [email protected]/basic/OWNER/REPOSITORY/go/,,direct
set GOPROXY=https://token:[email protected]/basic/OWNER/REPOSITORY/go/,,direct

Windows (Powershell)

$env:GOPROXY=https://USERNAME:[email protected]/basic/OWNER/REPOSITORY/go/,,direct
$env:GOPROXY=https://USERNAME:[email protected]/basic/OWNER/REPOSITORY/go/,,direct
$env:GOPROXY=https://token:[email protected]/basic/OWNER/REPOSITORY/go/,,direct


The Go sumdb cannot record the hash value of a private repository and this will cause the local Go command to fail the verification after downloading.

It is recommended to use the environment variable GONOSUMDB= to skip verification for your Cloudsmith repositories, or alternatively (but less secure), use the environment variable GOSUMDB=off to turn off the verification completely.

Installing a Package

You can install the latest version of a package with:


Or install a specific version of a package with:

go get [email protected]_VERSION

Upstream Proxying / Caching

Not Supported


Please see the Troubleshooting page for further help and information.

Updated a day ago

Go Registry

Cloudsmith provides public & private registries for Go

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.

Cloudsmith is the new standard in Package Management and Software Distribution

With support for all major package formats, you can trust us to manage your software supply chain.

Start My Free Trial Now
Cookie Declaration (Manage Cookies)