HTTP / SSH Authentication
In order to sync data from any remote git
host (like self-hosted Gitea instance or plain ssh
servers), follow these steps:
- Create a new
provider
using the genericgit
option
After creating the provider run the following query (either using
psql
or the built-in query panel):SELECT mergestat.add_service_auth_credential('<provider>', 'BASIC_AUTH', '<username>', '<credential>', '<secret>');
Use either
BASIC_AUTH
(forhttp
) or one ofRSA
,DSA
orECDSA
(forssh
) credentials with the provider.Here,
<provider
is the unique identifier for the new provider (which you can find in the browser's address bar) and<secret>
is the value for theENCRYPTION_SECRET
environment variable.If you run into errors about unknown vendor / credential type, execute the following statements:
INSERT INTO mergestat.vendors (name, display_name, description) VALUES
('git', 'Generic Git', 'Access to any git repositories');
INSERT INTO mergestat.service_auth_credential_types (type, description) VALUES
('RSA', 'Authentication using RSA Private Keys'),
('DSA', 'Authentication using DSA Private Keys'),
('ECDSA', 'Authentication using ECDSA Private Keys'),
('BASIC_AUTH', 'Authentication using plain username/password pair');Now use the UI to add new repositories to the newly registered provider
- For
http
use eitherhttp://
orhttps://
orgit://
as the url scheme - For
ssh
usessh://
as the url scheme
- For