Error cannot pull from repository
So, I have been interested to use git-o-matic to deploy some internal network containers using git-hooks automatically.
The way I have in mind is using git-o-matic to automatically pull changes in my develop branch and use my post-merge hooks (Already working) to restart the container with said new code.
My problem is I keep getting the following message:
2020/02/17 15:04:57 Checking repository: .
2020/02/17 15:04:57 Pulling changes...
cannot pull from repository: non-fast-forward update
The way I am launching it in my server is:
gitomatic -privkey <path-to-my-deploy-key> -pull=true -push=false <path-to-my-local-repo>
Any help regarding getting this to work would be appreciated.
It looks like your repository has uncommitted/unstashed local changes. Since non-fast-forward updates could cause merge conflicts, gitomatic is currently not attempting to fetch any updates. This could be improved, but it'll always be a difficult situation to handle for an automated system like gitomatic.
So I did some verifications, and even cloned the repository again, but keep getting the same messages. Nothing is stashed or un-commited.
If it's important, git-o-matic was installed using the binary package.
Could you do a git status in the repository and attach the output, please?
I'll do. Can't access the server right now due to an outage. but ASAP I'll post here.
Ok, here it is:
On branch develop
Your branch is up to date with 'origin/develop'.
nothing to commit, working tree clean
To be more clear in what I want to accomplish and my current setup:
- I generated and added a new deploy key to this repository, with pull access
- I cloned the project and pulled from develop branch with
git checkout --track origin/develop - The
git-hookI setup is triggering when I do a manualgit pull - The deploy key has no password, so there's no additional authentication needed besides passing the private key if I understood correctly.
I have all this setup on a Debian 10 host, using latest binary release of git-o-matic.
Ok, looks like a problem with tracking a non-master branch. I'm looking into this right now.
Thanks, is there any additional info I can provide you with?