Note
This page describes the functionality as of Workbench version XXX
For older versions of Workbench, see this page:
We recommend using the SSH protocol for authentication between MettleCI Workbench and your remote Git repositories as it is easier to manage access in a uniform manner across multiple remote Git repository hosts (Github, Bitbucket, Gitlab, etc). SSH keys also tend to be more secure than username/password credentials.
In the event that you need to use Git HTTPS rather than SSH, you can configure MettleCI Workbench to store a set of username/password credentials, for each user, which will be used for all Git HTTPS requests by modifying the config.yml
as shown below:
... gitAuthentication: sshKey: "/opt/dm/mci/workbench.key" httpsEnabled: true httpsCredentialsStore: password: ${file:UTF-8:/opt/dm/mci/.secrets/git-credentials-keystore} ...
The git credentials will be stored in a keystore that requires a password. This password should be store in a file in the .secrets
directory and that file should be referenced in the config.yml
file, as shown above.
The Workbench Setup Wizard will generate this file for you. If you are upgrading from an older version of Workbench, you will need to generate this file yourself.
MettleCI Workbench will need to be restarted after saving changes to config.yml
.
When HTTPS is enabled, each user can add their git credentials on the Profile page which they can access from the menu in the top right corner of Workbench:
You can then enter Git HTTPS or SSH repository URLS in the project registration page. The ssh or https credentials will be used depending on the configured Git protocol, any username shown in the URL will be ignored and overridden by the settings included in config.yml
:
Tip
While most Git repository hosts only support HTTPS and SSH protocols, MettleCI Workbench also supports HTTP and FTP. The same credentials are used, the only difference is the registered Git URL will be prefixed with http:// or ftp:// protocols.