Pushing a Package to the Server

This is a step by step guide to pushing a package to the package server.

See the package server guide for more information about the McNeel public package server.

Authentication

Before you can push a package to the server, you need to authorize the Yak CLI tool using your Rhino Account.

> "C:\Program Files\Rhino 7\System\Yak.exe" login

A browser tab should open asking you to log in to Rhino Accounts (assuming you are not already logged in). The next window will ask you to give “Yak” access to your account.

  • View basic info about you: This scope is used to retrieve your name, locale and profile picture. This information will be used in the future, when the package database has a graphical interface.
  • Verify your identity: Used for authentication when querying package ownership.
  • View your email address: Your primary email address is stored so that you can be added as an owner of packages that others have published.

Once you’ve accepted, the browser window will close itself. Yak has retrieved an OAuth token from Rhino Accounts and has stored this on your computer.

  • Mac - ~/.mcneel/yak.yml
  • Windows - %APPDATA%\McNeel\yak.yml

Push!

Now that you’re logged in, it’s possible to push a package to the server. I’ll use the package created in the previous guide as an example.

> "C:\Program Files\Rhino 7\System\Yak.exe" push marmoset-1.0.0-rh6_18-any.yak

This command doesn’t produce any output on success.

You can check that your package has been successfully pushed by searching for it. You should see the name and version number of the package that you just pushed. 🤞

> "C:\Program Files\Rhino 7\System\Yak.exe" search --all --prerelease marmoset

marmoset (1.0.0)

Troubleshooting

There are a few reasons why pushing a package might not work.

  • Invalid manifest.yml

    The error message should be self explanatory. Fix it up and try again! You can also try validating the YAML syntax itself with a linter.

  • The package name already exists, but you’re not an owner.

    Only package owners are permitted to push new versions of their packages. When a user pushes the first version of a package, they become its owner. Additional owners can be added with the owner command.

  • The package version already exists.

    In order to prevent disruption to others who are using one of your packages, it’s not possible to delete or overwrite versions. Roll the version number and let your users know that there’s something new for them to try!

  • Push something that you didn’t mean to?

    Use the yank command to unlist a specific version.