git-acp-ansible icon indicating copy to clipboard operation
git-acp-ansible copied to clipboard

Git push failed with rejected

Open maheshnalawade1986 opened this issue 1 year ago • 1 comments

Hi team,

Facing issue when using this module in my playbook to push the code to repo.

Code:

  • name: push lvrfrc87.git_acp: path: "/tmp/gitcpone" branch: "{{ branch_name }} comment: "test" url: "https://testurl" pull: true

Error:- To https://testurl ![rejected] develop -> develop (fetch first) error: failed to push some refs to 'https://testurl' hint: Updates were rejected because the remote contains work that you do not have locally.This is usually caused by another repository pushing to the same ref.You may want to first integrate the remote charges (e.g.,'git pull...') before pushing again.See the 'Note about fast-forwards' in 'git push --help' for details

maheshnalawade1986 avatar Feb 24 '24 21:02 maheshnalawade1986

Hi @maheshnalawade1986, Like the error is saying, you would need to pull first then you should be able to commit and push

lvrfrc87 avatar Jun 04 '24 11:06 lvrfrc87