what initiates the push to remote?
k3it opened this issue · 5 comments
hello
I followed the example of adding a file to a repo via HTTPS mode. I can see that the commit was made to the local working directory but was not pushed to the remote. how can i trigger the push ?
@k3it Push is triggered automatically after commit. Would you mind send me the playbook you are using and run it in verbose mode? -vvv
the playbook is the same in the example except different paths and repo
- name: HTTPS | add file1.
git_acp:
user: Federico87
token: mytoken
path: /Users/git/git_acp
branch: master
comment: Add file1.
remote: origin
add: [ "." ]
mode: https
url: "https://gitlab.com/networkAutomation/git_test_module.git"
From what I can see it hangs indefinitely on this command
/usr/bin/ssh git@gitlab.x.x.x git-receive-pack 'xxxx.git'
it just sits there not doing anything and playbook never completes. If i cancel and re-run, the playbook finishes without a push because the file is already added to the local repo, and the module thinks that no push is needed. There is a message that local branch is ahead of the origin though
@k3it I have never encountered git-receive-pac
command before so I would not expect to see that. The module rely on underlay git library installed on OS where the playbook is running.
Can you please send the output of git --version
as well as run the playbook in verbose mode (append -vvvv
at the end of the command)
Also, please make sure your repo is up-to-date with remote before to commit and push.