Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error cannot pull from repository #7

Open
deadpyxel opened this issue Feb 17, 2020 · 7 comments
Open

Error cannot pull from repository #7

deadpyxel opened this issue Feb 17, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@deadpyxel
Copy link

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.

@muesli
Copy link
Owner

muesli commented Feb 18, 2020

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.

@deadpyxel
Copy link
Author

deadpyxel commented Feb 20, 2020

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.

@muesli
Copy link
Owner

muesli commented Feb 20, 2020

Could you do a git status in the repository and attach the output, please?

@deadpyxel
Copy link
Author

I'll do. Can't access the server right now due to an outage. but ASAP I'll post here.

@deadpyxel
Copy link
Author

deadpyxel commented Feb 22, 2020

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:

  1. I generated and added a new deploy key to this repository, with pull access
  2. I cloned the project and pulled from develop branch with git checkout --track origin/develop
  3. The git-hook I setup is triggering when I do a manual git pull
  4. 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.

@muesli
Copy link
Owner

muesli commented Feb 25, 2020

Ok, looks like a problem with tracking a non-master branch. I'm looking into this right now.

@muesli muesli added the bug Something isn't working label Feb 25, 2020
@deadpyxel
Copy link
Author

Thanks, is there any additional info I can provide you with?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants