Skip to content

Latest commit

 

History

History
57 lines (34 loc) · 2 KB

File metadata and controls

57 lines (34 loc) · 2 KB

Module clazzfish-spi-git

This module supports the GIT protocol to import/export statistics. It supports URIs like

It is recommended to use SSH because HTTPS needs user/password authentification which is not yet supported:

java -Dclazzfish.dump.uri=ssh://git@github.com/oboehm/ClazzFish.git

This will import and export ClazzStatistic.csv to a GitHub repository.

SSH-Support

SSH works with private and public keys. To access a GIT repository via SSH you must usually upload your public key to the GIT server. Your private key must be known by this module otherwise you'll get an "auth failed" when it tries to connect to the git server. Usually both are stored in your home directory in the .ssh directory:

  • id_rsa: private key (RSA algorithm)
  • id_rsa.pub: public key

Define SSH-Key

As default clazzfish-spi-git module uses $HOME/id_rsa as private SSH key. If you want to use another SSH key you can set the environment variable clazzfish.git.ssh.keyfile:

java -Dclazzfish.git.ssh.keyfile=my_id_rsa ...

This will use my_id_rsa in the current directory as SSH key.

Invalid Privatekey

clazzfish-spi-git uses JSch for SSH support. It uses your local private key to access your GIT server. Unfortunately, this file format must be in the classic OpenSSH format because JSch does not support the new OpenSSH format. If you get the error message like

invalid privatekey: [B@59c40796.

it is likely that your private keyfile is in the wrong format or not supported. You can transform it using ssh-keygen:

ssh-keygen -p -f .ssh/id_rsa -m pem

For more info, see this stackoverflow article.

Another pitfall is the protocol type. Not all types (e.g. ed25519) are supported. Use rsa if you are not sure if the protocol type is supported:

ssh-keygen -t rsa -m pem