This is a step by step guide to pushing a package to the Yak server.
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 6\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.
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 -
- Windows -
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 6\System\Yak.exe" push marmoset-1.0.0.yak
Currently (v0.2), 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 6\System\Yak.exe" search --all --prerelease marmoset marmoset (1.0.0)
There are a few reasons why pushing a package might not work.
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. In the future it will be possible to grant ownership to other users. Package names are case-insensitive.
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!