Question

Originally based on this guide: Using Bitbucket for Automated Deployments

I have a repo set up on BitBucket with a POST hook pointing to the deploy.php script on my web server. The only difference between my script and the default code in the guide is the path on line 143:

$deploy = new Deploy('/home/my_username/my_domain.com');

As expected, the script runs whenever I push a commit to my origin repo on BitBucket but it doesn't pull in any new commits. The 2 entries in the log from lines 117 and 121 are:

INFO: Resetting repository... HEAD is now at 35272c4 Initial commit
INFO: Pulling in changes... HEAD is now at 35272c4 Initial commit

No matter how many times I push a new commit, this script will not detect any new commits. But if I ssh to my web server and run git pull origin master, it will ask for my passphrase and then will successfully pull in all commits since the last pull.

Is it possible to set up this connection to avoid the passphrase prompt so that it performs the git pull successfully?

Was it helpful?

Solution

I was under the impression that ssh keys needed a passphrase, but it turns out the that's not the case. When it was initially created and I was prompted for the passphrase, I could have just pressed the Enter key to leave the passphrase empty.

I was able to modify my already existing ssh key, however, by running ssh-keygen -p as I found here: How do I change my private key passphrase?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top