# Git<no value>
// <!-- Required for asciidoctor -->
:toc:
// Set toclevels to be at least your hugo [markup.tableOfContents.endLevel] config key
:toclevels: 4

== Description

The "scm" of kind `git`, defines parameters to interact with a git repository. It is then referenced from another "resource" by using the key `scmID`.
Depending on the resource that referenced the git configuration, the behavior will change.

**source**

When a source resource references a scm configuration, then it usually means using a file from that repository.

**condition**

When a condition references a scm configuration, then it usually means using a file from that repository.

**target**

When a target references a scm configuration, it usually means pushing file to that repository.

== Parameters

{{< resourceparameters "scms" "git" >}}

=== GPG

Updatecli can sign commits using a private GPG key if configured accordingly.

---
[cols="1,1,1,4",options=header]
|===
| Name | Required | Default |Description
| signingkey ||| Defines the armored private gpg key
| password ||| Defines the gpg key password
|===


=== CommitMessage

Updatecli uses conventional commits as describe on link:https://www.conventionalcommits.org/[www.conventionnalcommits.org]. +
The goal is to add human and machine readable meaning to commit messages

By default, Updatecli generates a commit message using the default type "chore" and split long title message into the body like:

---
```
Author: olblak <updatecli@updatecli.io>
Date:   Tue May 4 15:41:44 2021 +0200

    chore: Update key "dependencies[0].version" from file "charts/jenkins/r...

    ... equirements.yaml"

    Made with ❤️️  by updatecli
```
---


[cols="1,1,1,4",options=header]
|===
| Name | Required | Default |Description
|type ||chore| Specify commit type
|scope ||| Specify commit scope
|footer ||| Specify commit footer message
|title ||| Override default body message
|hideCredit ||| Remove "Made with ❤️️  by updatecli" from commit message body
|body ||| Override default body message
|===

=== Authentication

At the moment they are two ways to authentication with a git repository, either using a `username`/`password`` from the updatecli configuration, or relying on the local ssh-agent.

== Example

**updatecli.yaml**
```
{{< include "assets/code_example/docs/plugins/scm/git/updatecli.d/default.yaml" >}}
```
