mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-15 13:26:54 +00:00
parent
f2463cab1a
commit
4153aed71b
@ -9,7 +9,7 @@ sharing: true
|
|||||||
footer: true
|
footer: true
|
||||||
---
|
---
|
||||||
|
|
||||||
Load and update configuration files for Home Assistant from a GIT repository.
|
Load and update configuration files for Home Assistant from a [Git](https://git-scm.com/) repository.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@ -22,6 +22,8 @@ Load and update configuration files for Home Assistant from a GIT repository.
|
|||||||
"active": false,
|
"active": false,
|
||||||
"interval": 300
|
"interval": 300
|
||||||
},
|
},
|
||||||
|
"deployment_user": "",
|
||||||
|
"deployment_password": "",
|
||||||
"deployment_key": [
|
"deployment_key": [
|
||||||
"-----BEGIN RSA PRIVATE KEY-----",
|
"-----BEGIN RSA PRIVATE KEY-----",
|
||||||
"MIIEowIBAAKCAQEAv3hUrCvqGZKpXQ5ofxTOuH6pYSOZDsCqPqmaGBdUzBFgauQM",
|
"MIIEowIBAAKCAQEAv3hUrCvqGZKpXQ5ofxTOuH6pYSOZDsCqPqmaGBdUzBFgauQM",
|
||||||
@ -35,33 +37,33 @@ Load and update configuration files for Home Assistant from a GIT repository.
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- **repository** (*Required*): Git URL to your repository (make sure to use double quotes). You have to add .git to your GitHub repository URL (see example config)
|
- **repository** (*Required*): Git URL to your repository (make sure to use double quotes). You have to add `.git` to your GitHub repository URL (see example configuration)
|
||||||
- **git_branch** (*Required*): Branch name of the git repo, leave this as 'master' if you are unsure.
|
- **git_branch** (*Required*): Branch name of the Git repo, leave this as 'master' if you are unsure.
|
||||||
- **git_remote** (*Required*): Name of the tracked repository, leave this as 'origin' if you are unsure.
|
- **git_remote** (*Required*): Name of the tracked repository. Leave this as `origin` if you are unsure.
|
||||||
- **git_command** (*Required*): Must be either 'pull' or 'reset', leave this as 'pull' if you are unsure.
|
- **git_command** (*Required*): Must be either `pull` or `reset`. Leave this as `pull` if you are unsure.
|
||||||
|
|
||||||
* **pull**: Incorporates changes from a remote repository into the current branch. Will preserve any local changes to tracked files.
|
* **pull**: Incorporates changes from a remote repository into the current branch. Will preserve any local changes to tracked files.
|
||||||
* **reset**: Will execute ```git reset --hard``` and overwrite any local changes to tracked files and update from the remote repository.
|
* **reset**: Will execute `git reset --hard` and overwrite any local changes to tracked files and update from the remote repository.
|
||||||
|
|
||||||
<p class='note warning'>
|
<p class='note warning'>
|
||||||
Using the <b>reset</b> option will overwrite changes to tracked files. Tracked files are those visible in the Github repository or those given by the output on this command: ```git ls-tree -r master --name-only```
|
Using the `reset` option will overwrite changes to tracked files. Tracked files are those visible in the Github repository or those given by the output on this command: `git ls-tree -r master --name-only`.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
- **auto_restart** (*Optional*): Restart Home Assistant when the configuration has changed (and is valid).
|
- **auto_restart** (*Optional*): Restart Home Assistant when the configuration has changed (and is valid).
|
||||||
- **repeat/active** (*Optional*): Pull periodic for git updates.
|
- **repeat/active** (*Optional*): Pull periodic for Git updates.
|
||||||
- **repeat/interval** (*Optional*): Pull all x seconds and look for changes.
|
- **repeat/interval** (*Optional*): Pull all x seconds and look for changes.
|
||||||
- **deployment_user** (*Optional*): Username to use when authenticating to a repo with a username and password.
|
- **deployment_user** (*Optional*): Username to use when authenticating to a repository with a username and password.
|
||||||
- **deployment_password** (*Optional*): Password to use when authenticating to a repo. Ignored if deployment_user is not set.
|
- **deployment_password** (*Optional*): Password to use when authenticating to a repository. Ignored if `deployment_user` is not set.
|
||||||
- **deployment_key** (*Optional*): A private SSH key that will be used for communication during git operations. This key is mandatory for ssh-accessed repositories, which are the ones with the following pattern: `<user>@<host>:<repository path>`.
|
- **deployment_key** (*Optional*): A private SSH key that will be used for communication during Git operations. This key is mandatory for ssh-accessed repositories, which are the ones with the following pattern: `<user>@<host>:<repository path>`.
|
||||||
- **deployment_key_protocol** (*Optional*): The key protocol. Default is "rsa". Valid protocols are:
|
- **deployment_key_protocol** (*Optional*): The key protocol. Default is `rsa`. Valid protocols are:
|
||||||
|
|
||||||
* **dsa**
|
* **dsa**
|
||||||
* **ecdsa**
|
* **ecdsa**
|
||||||
* **ed25519**
|
* **ed25519**
|
||||||
* **rsa**
|
* **rsa**
|
||||||
|
|
||||||
The protocol is typically known by the suffix of the private key --e.g., a key file named `id_rsa` will be a private key using "rsa" protocol.
|
The protocol is typically known by the suffix of the private key --e.g., a key file named `id_rsa` will be a private key using `rsa` protocol.
|
||||||
|
|
||||||
<p class='note warning'>
|
<p class='note warning'>
|
||||||
You should only use this add-on if you do not have an existing configuration or if your existing configuration is already in a git repository. If the script does not find the necessary git files in your configuration folder, it will delete anything that might be there. Please ensure that there is a `.git` folder before using this. You can verify this by listing the items in the configuration folder including hidden files. The command is `ls -a /config`.
|
You should only use this add-on if you do not have an existing configuration or if your existing configuration is already in a Git repository. If the script does not find the necessary Git files in your configuration folder, it will delete anything that might be there. Please ensure that there is a `.git` folder before using this. You can verify this by listing the items in the configuration folder including hidden files. The command is `ls -a /config`.
|
||||||
</p>
|
</p>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user