I am trying to use the git pull add-on but it seems to be malforming the private key.
When I add my deployment SSH key to the GUI or YAML and hit save, it reformats the config before starting the add-on and results in this error:
[Warn] No valid SSH connection for [email protected]
[Info] Start adding SSH key
[Info] Setup deployment_key on id_ed25519
[Info] setting up credential.helper for user: str
[Info] Saving git credentials to /tmp/git-credentials
fatal: refusing to work with credential missing host field
[Info] Local git repository exists
[Info] Git origin is correctly set to [email protected]:baudneo/<REDACTED>.git
[Info] Start git fetch...
Load key "/root/.ssh/id_ed25519": error in libcrypto
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
[Error] Git fetch failed
Here is how the add-on is formatting the config after hitting save:
repository: [email protected]:baudneo/<REDACTED>.git
git_branch: master
git_remote: origin
auto_restart: false
restart_ignore:
- ui-lovelace.yaml
- .gitignore
git_command: pull
git_prune: false
deployment_key:
- >-
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACAjwLVL5pTg4dDLVKFLdg937uVedACrI66pEelMAeifkgAAAJhX6wwjV+sM
IwAAAAtzc2gtZWQyNTUxOQAAACAjwLVL5pTg4dDLVKFLdg937uVedACrI66pEelMAeifkg
<REDACTED>
<REDACTED> ----END OPENSSH
PRIVATE KEY-----
deployment_user: str
deployment_password: password
deployment_key_protocol: ed25519
repeat:
active: true
interval: 300
From brief searching on google, people are saying it could be needing a newline at the end.
Is anyone else using this add-on with an SSH key and it works?
I confirmed the SSH key is valid from, my hass machine using:
ssh -i /root/.ssh/id_ed25519 -T [email protected]
Hi baudneo! You've successfully authenticated, but GitHub does not provide shell access.
So the error seems to be malformed SSH private key, please correct me if I am wrong!