On 12/10/19 2:11 PM, Gyalgin Sherpa wrote:
> That’s my issue, I am already using public key and also asking me credentials
>
> Best
So the private key needs to be on the target and maybe you need key_file parameter
(
https://docs.ansible.com/ansible/latest/modules/git_module.html).
You tried a workaround instead of fixing the real problem. Such a waste of time :-)
Regards
Racke
>
> On Tue, Dec 10, 2019 at 08:06 Stefan Hornburg (Racke) <
ra...@linuxia.de <mailto:
ra...@linuxia.de>> wrote:
>
> On 12/10/19 2:02 PM, Gyalgin Sherpa wrote:
> > That’s as usual with public key
> >
>
> So why doesn't the Ansible user use a public key?
>
> Regards
> Racke
>
> > On Tue, Dec 10, 2019 at 07:57 Stefan Hornburg (Racke) <
ra...@linuxia.de <mailto:
ra...@linuxia.de>
> > <mailto:
ka...@2pisoftware.com <mailto:
ka...@2pisoftware.com>>>>> wrote:
> > > >
> > > > You may be missing the point of Stefan's question. Is Ansible executing this git command as the SAME
> > USER that you
> > > > are executing the git command as, when you execute the command manually?
> > > >
> > > > Authentication for git is user-based. If Ansible is not running the command as the SAME USER that
> you are
> > > using when
> > > > you run the command manually, then you can expect authentication to fail. By the way, the user that
> > Ansible is
> > > > running git as is NOT necessarily the user that is running Ansible.
> > > >
> > > > A quick look at the Ansible docs reveals a git_config module. You could try using it to retrieve the
> > global git
> > > > configuration (the equivalent of running git config --global -l) via Ansible on the target host. Does
> > the output
> > > > match what you get when you execute that command manually on the target host? If not, you have
> found the
> > problem.
> > > >
> > > > Regards, K.
> > > >
> > > > On Tue, Dec 10, 2019 at 8:17 PM Gyalgin Sherpa <
gshe...@gmail.com <mailto:
gshe...@gmail.com>
> <mailto:
gshe...@gmail.com <mailto:
gshe...@gmail.com>>
> > <mailto:
gshe...@gmail.com <mailto:
gshe...@gmail.com> <mailto:
gshe...@gmail.com
> <mailto:
gshe...@gmail.com>>>
> > > <mailto:
gshe...@gmail.com <mailto:
gshe...@gmail.com> <mailto:
gshe...@gmail.com
> <mailto:
gshe...@gmail.com>> <mailto:
gshe...@gmail.com <mailto:
gshe...@gmail.com>
> > > <mailto:
ansible-project%25252Bun...@googlegroups.com
> <mailto:
ansible-project%2525252Bu...@googlegroups.com>
> > <mailto:
ansible-project%2525252Bu...@googlegroups.com
> <mailto:
ansible-project%252525252B...@googlegroups.com>>>>>
> > > <mailto:
ansible-project%25252Bun...@googlegroups.com
> <mailto:
ansible-project%2525252Bu...@googlegroups.com>
> > <mailto:
ansible-project%2525252Bu...@googlegroups.com
> <mailto:
ansible-project%252525252B...@googlegroups.com>>>>>>.
> > > <mailto:
ansible-project%25252Bun...@googlegroups.com
> <mailto:
ansible-project%2525252Bu...@googlegroups.com>
> > <mailto:
ansible-project%2525252Bu...@googlegroups.com
> <mailto:
ansible-project%252525252B...@googlegroups.com>>>>>.
> > <mailto:
ka...@2pisoftware.com <mailto:
ka...@2pisoftware.com>>> <mailto:
ka...@2pisoftware.com
> <mailto:
ka...@2pisoftware.com>>>>
> > > >
2pisoftware.com <
http://2pisoftware.com> <
http://2pisoftware.com> <
http://2pisoftware.com>
>
https://groups.google.com/d/msgid/ansible-project/d88ce217-be45-14ba-1a14-7f2344140dee%40linuxia.de.
>
https://groups.google.com/d/msgid/ansible-project/CABynDMFr89ooM0nZaDfn4tAHnMEwh1UPGo0mH9fb6Uuk%2BASVPQ%40mail.gmail.com
> <
https://groups.google.com/d/msgid/ansible-project/CABynDMFr89ooM0nZaDfn4tAHnMEwh1UPGo0mH9fb6Uuk%2BASVPQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.