Ansible and Git Permission denied (publickey) at Git Clone

前端 未结 3 1306
挽巷
挽巷 2021-02-20 17:11

I have a playbook where I am trying to clone from a private repo (GIT) to a server.

I have setup ssh forwarding and when I ssh into the server and try to manually clone

3条回答
  •  鱼传尺愫
    2021-02-20 17:48

    On a localhost-only -scenario ForwardAgent is completely useless, as it would forward the agent only to a remote host.

    Even if git works from command-line when run manually, it doesn't work from Ansible no matter what. The only working solution I found was to convert git into command, like: - command: /usr/bin/git clone git@github

提交回复
热议问题