[git-exporter] More accurate instructions
Closed this issue · 4 comments
Which addon?
Git-exporter
How do i initially setup this addon? Could you add more informations?
I am facing always the same error. I have setted up a fresh github repository and it won't push the contents to it.
Here is the full log:
[16:24:04] INFO: Start git export
[16:24:05] INFO: Pull latest
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
warning: unable to rmdir 'config': Directory not empty
HEAD is now at f17e099 first commit
[16:24:05] INFO: Get Home Assistant config
[16:24:14] INFO: Get addon repositories
[16:24:15] INFO: Commit changes and push to remote
warning: adding embedded git repository: config
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add config
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached config
hint:
hint: See "git help submodule" for more information.
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
[master eb5c066] Home Assistant Git Exporter
2 files changed, 113 insertions(+)
create mode 100644 addons/repositories.yaml
create mode 160000 config
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin master
Did you manually checkout the git repo? Or did you let the addon do it on the first run?
Did it start as a repo on disk, or did you create it originally on GH?
So if I start with an empty repo, but don't even create the expected branch...
[15:41:59] INFO: Start git export
[15:42:00] INFO: Create local repository
[15:42:00] INFO: Clone existing repository
Cloning into '/data/repository'...
warning: You appear to have cloned an empty repository.
error: pathspec 'main' did not match any file(s) known to git
If I create a new repo, adding a LICENSE and a README.md, onto the default branch of main...
I get further, until it complains about /data/repository/config/configuration.yaml
containing secrets. #425 improves the output a little for this...
Move the secrets, run it again...
Pushed fine...
It might be worth making a backup of your config, delete the add-on and reinstall it to clear the "repository" it currently has...