我已经设置了everyhing我可以找到,但仍克隆从GitHub repo挂起配置过程。Git通过SSH在Ansible挂起,事件虽然ssh代理转发设置
我有:在known_hosts中
- 服务器
的.ssh/config中
Host github.com ForwardAgent yes StrictHostKeyChecking no
复制私钥
- 公共密钥是通过在authorized_keys
- 命令运行作为
vagrant
用户 的打法是:
- name: Checkout from git git: [email protected]:username/repositoryname.git dest=/srv/website
请确保您没有使用'sudo'运行此任务,因为它会中断代理转发。 –
@techtonik即使转发设置为root用户? – cvsguimaraes
@cvsguimaraes转发是从您的'ssh-agent'端口到远程SSH端口的连锁,并且通过'sudo'打破这个链条,除非您解决这个问题。请参阅http://stackoverflow.com/a/24134109/239247 –