May 2, 2020

Meuse 0.5.0 released !

I’ve released today the version 0.5.0 of Meuse, my free alternative registry for the Rust programming language. A new way to manage the crate index has been added in this release.

Managing the crate index

Crates metadata are stored in a Git repository. For example, the index for crates.io is available on Github. A crate registry should be able to manage this Git repository (adding files, running git commands like commit, push…​).

The previous versions of Meuse were shelling out to the git command (which should then be available on the Meuse machine) to perform that. It works well, but a new way of managing the index has been added to this release.

JGit

JGit is an implementation of Git in pure Java. i’ve integrated this library in Meuse. This allow users to manage the index even if the git command is not installed on the machine.

You can specify the way Meuse is managing the index in the configuration file. By default, the git command is used, as it was before. You can enable JGit by adding a type: jgit in the metadata configuration section:

metadata:
  # use jgit
  type: "jgit"
  # The local path of your Git index
  path: "/home/mathieu/prog/rust/testregistry"
  # The branch which will contain the metadata files
  target: "origin/master"
  # The URL of your Git index.
  url: "https://github.com/mcorbin/testregistry"
  # the Git username
  username: my-git-usename
  # the Git password
  password: my-git-password

You should also specify in the configuration the credentials (username and password) to interact with the Git repository. Remember that Meuse uses the Yummy library to load the YAML file, so you can use for example the !envvar flag to read an environment variable.

JGit also works with Github Access Token (which are needed if you have enabled the 2FA on your Github account). In that case, the password should be the token.

I hope this feature will help you running Meuse in more contexts, for example in containers (where it can be difficult to set up SSH authentication for the git command for example).

Tags: projects english

Add a comment








If you have a bug/issue with the commenting system, please send me an email (my email is in the "About" section).

Top of page