ansistrano / deploy

Ansible role to deploy scripting applications like PHP, Python, Ruby, etc. in a capistrano style
https://ansistrano.com
MIT License
2.37k stars 343 forks source link

Task freezes at "Update remote repository using SSH key" #353

Closed kaka-ruto closed 4 years ago

kaka-ruto commented 4 years ago

When deploying, everything works well until it reaches TASK [ansistrano.deploy : ANSISTRANO | GIT | Update remote repository using SSH key], where it freezes for as long as it can without exiting, even with an error.

I have regenerated keys without passphrases and added them to my private repo under deploy keys.

I have also added the private keys to ssh-agent and added this to my ansible.cfg

[ssh_connection] ssh_args = -o ForwardAgent=yes

It still won't work. please direct me?

I am suspecting the issue to be that the remote host cannot pull my private repository because it doesn't have the private keys, but at this point I do not why the solutions above do not work. (haven't tried manually copying the keys)

PS: I have two keys, a .pem key for accessing the server, and an id_rsa private key with it's public key added to Github.

ricardclau commented 4 years ago

As you point out, the remote server probably does not have access to the git server either because of a network firewall or because you don't supply the correct key.

There are mechanisms in the docs to supply keys but this is certainly not a bug

jwachira commented 3 years ago

@kaka-ruto - did you ever figure out this issue?

kaka-ruto commented 3 years ago

Hi @jwachira, unfortunately I did not. As observed above, somehow I couldn't get to pass my keys to the server to allow it to pull the repo from Github (though I tried)

The hustle of configuring a server using Ansible was cumbersome. I decided to deploy with docker, which tbh made things easier, but then I had to learn a couple new things as well, but overally still better.

Let me know if I can help in any other way.

danieldraper commented 3 years ago

I'm also experiencing this issue, would be great to see some more documentation around this.