Repo management
editRepo management
editCode starts with an overview of your repositories. You can then use the UI to add, delete, and reindex a repo.
Add and delete a repo
editThe Import your first repository page provides step-by-step instructions for adding a GitHub repo to Code. You can fine tune the hostname of the git clone URL in your kibana.yml
file.
For security reasons, Code allows only a few trusted hostnames, such as github.com, by default. You can add an SSH key to Kibana to clone private repos.
Deleting a repo removes it from local storage and the Elasticsearch index.
Reindex a repo
editYou can set Code to automatically reindex imported repos at set intervals by set the following config in kibana.yaml
.
xpack.code.disableIndexScheduler: false
In some cases you might need to manually refresh the index besides automatic indexing. For example, you might refresh an index after a new language server is installed. Or, you might want to immediately update the index to the HEAD revision. Click Reindex to initiate a reindex.
Clone URL management
editFor security reasons, Code only allows the following hostnames in the git clone URL by default:
-
github.com
-
gitlab.com
-
bitbucket.org
-
gitbox.apache.org
-
eclipse.org
You can add your own hostname (for example, acme.com) to the whitelist by adding the following line to your config/kibana.yaml
file:
xpack.code.security.gitHostWhitelist: [ "github.com", "gitlab.com", "bitbucket.org", "gitbox.apache.org", "eclipse.org", "acme.com" ]
Set xpack.code.security.gitHostWhitelist
to [] (empty list) allow any hostname.
You can also control the protocol to use for the clone address. By default, the following protocols are supported: [ 'https', 'git', 'ssh' ]
. You can change this value by adding the following line to your config/kibana.yaml
file. In this example, the user only wants to support the https
protocol:
xpack.code.security.gitProtocolWhitelist: [ "https" ]
Clone repo with SSH key
editIf your repo clone requires an SSH key for authentication, put the SSH key in data/code/credentials/
under the Kibana folder.