Using Gemfury via Command Line

We are phasing out this Ruby-based CLI in favor of a new native CLI. We encourage everyone to upgrade.

RubyGem Version

Gemfury CLI allows you to control your Gemfury account without opening a browser. Once you register for an account, you can start by installing the command-line tool:

$ gem install gemfury

You will need a working Ruby and Rubygems setup in your system. Ruby version at least 1.8 is required.

The CLI is also available as a Debian package and an RPM package, for installing on compatible systems.

Authenticate with your Gemfury login credentials:

$ fury login
Please enter your Gemfury credentials.
Email: youremail@domain.com
Password: <hidden password>
You are logged in as "[USERNAME]"

And subsequently upload your first package:

$ fury push package-1.0.0.gem

That’s it!

Uploading packages

Uploading your packages is easy. Once you’ve installed the Gemfury CLI, upload files to an account with:

$ fury push package-1.0.0.gem

If you are migrating from another server, or just have many packages lying around, you can specify a directory path and the CLI will upload all the packages found in that directory:

$ fury migrate ./path/to/codez

Listing packages

You can list the contents of your account with the following command, which will enumerate the names of all the packages along with the latest releasable version number:

$ fury list

And if you’d like to see all the versions of a particular package:

$ fury versions package-name

Removing packages

If you’ve uploaded a buggy package or accidentally checked-in some secret credentials into your code, you can easily remove a package version from your account:

$ fury yank package-name -v 0.1.0

Naming conflicts

You may have packages with the same name, but of different kinds. This is often the case if you’d like to distribute your software via multiple channels (e.g. APT & RPM, or npm & Bower). For this, you can add a KIND: prefix to the package name:

$ fury yank deb:package-name -v 0.1.0 -a ACCOUNT

This will work for all commands that accept a package name. You can find the kind specifier for a package on the dashboard, via list command, or the [Package Types][pkg-types] page.

Collaboration

You can share your Gemfury account with other Gemfury users. Your collaborators will be able to upload, download, and remove packages in your account without access to your Repo-URL or secret credentials.

Managing collaborators

Only the account owner can manage collaborators. Collaboration commands are all grouped under the sharing prefix. For example, to list the collaborators for your account:

$ fury sharing

Adding and removing collaborators is as easy as:

$ fury sharing:add USERNAME
$ fury sharing:remove USERNAME

Impersonation to use collaboration accounts

Once you have been added as a collaborator, you can perform Gem operations as the shared account via the –as option. For example, to upload a new Gem into the shared account:

$ fury push another-pkg-0.1.0.gem --as USERNAME

Same is possible with listing and deleting gems:

$ fury list --as USERNAME
$ fury yank another-pkg -v 0.1.0 --as USERNAME

Git repositories

Gemfury supports storing and building packages from source with our Git repository and builder. These repositories are stored and managed separately from the built packages in your account.

You can list repositories of an account with:

$ fury git:list

Yanking a built package does not implicitly delete the source Git repository, which you can explicitly do with:

$ fury git:reset repo-name

But if you yanked a package by mistake and want to rebuild it, use git:rebuild:

$ fury git:rebuild repo-name

Rebuilding a specific branch or tag is possible as well:

$ fury git:rebuild repo-name --revision refs/heads/release
$ fury git:rebuild repo-name --revision v2.3.1

You can also rename the repository – this will not update the [remote] entry in your .git/config file:

$ fury git:rename repo-name better-name

If you need more control of your Git repos, please let us know.

Logging-off and more

To remove your Gemfury credentials, or to change the current user, delete ~/.gems/gemfury file or run this command:

$ fury logout

You can find out about yanking gems and others commands with:

$ fury help

Install using Homebrew

First, you will need to add the official Homebrew tap of Gemfury.

For this, run the following:

$ brew tap gemfury/tap

Afterwards, install Gemfury CLI:

$ brew install gemfury

Install using the Debian package

First, you will need to add the official CLI repo as a source for packages.

For this, create a fury-cli.list file in the /etc/apt/sources.list.d directory. You will need sudo access to make these changes.

Add /etc/apt/sources.list.d/fury-cli.list:

deb [trusted=yes] https://cli.gemfury.com/apt/ /

Or use this “one-liner”:

$ echo "deb [trusted=yes] https://cli.gemfury.com/apt/ /" > \
/etc/apt/sources.list.d/fury-cli.list

At the moment, Gemfury does not support GPG-signed Release file. The [trusted=yes] parameter is important to tell APT to trust this repo without a signature. We will update this help page once GPG support is available.

Afterwards, update APT’s local cache:

$ apt update

Then install the Gemfury client

$ apt install gemfury

To learn more about Gemfury’s support of APT repositories, visit this page.

Install using the RPM package

First, you will need to add the official CLI repo as a source for packages.

For this, create a fury-cli.repo file in the /etc/yum.repos.d directory. You will need sudo access to make these changes.

Here is a basic template for /etc/yum.repos.d/fury-cli.repo:

[fury]
name=Gemfury Private Repo
baseurl=https://cli.gemfury.com/yum/
enabled=1
gpgcheck=0

At the moment, Gemfury does not support GPG-signed metadata. The gpgcheck=0 parameter is important to tell YUM to trust this repo without a signature. We will update this help page once GPG support is available.

Then install the Gemfury client

$ yum install gemfury

To learn more about Gemfury’s support of YUM repositories, visit this page.

Using the API client

The API and the API client library (included in this gem as Gemfury::Client) are built in Ruby and are currently in an unreleased semi-private undocumented development state.

To start using the client, you’ll need to get your API token from ~/.netrc and initialize the client like so:

client = Gemfury::Client.new(user_api_key: 'j8e6n7n5n3y09')

Stay tuned for more updates…

Contribution and Improvements

Please email us if we’ve missed some key functionality or if this gem causes conflicts. Better yet, fork the code, make the changes (specs too), and submit a pull request to speed things along.

Dependency conflicts

Over time, dependencies for this gem will get stale and may interfere with your other gems. Please let us know if you run into this and we will re-test our gem with the new version of the dependency and update the gemspec.