PHP Git Pull from GitHub Script SSH -


this first time i've tried use github service hooks automatically deploy server; , after working way on every obstacle looks last 1 one has done me in.

the initial clone of git repository onto web server done through ssh, , i'm pretty sure has problems now. current script basic:

<?php      echo(shell_exec('git pull 2>&1'));  ?> 

but returns "permission denied (publickey). fatal: remote end hung unexpectedly"; know script failing put in ssh pass phrase created. tried doing research on how maybe past it, don't know if correct/securest things do.

so can modified work here or need backtrack few steps , step away using ssh begin with?

thanks

can try replace (in git.config file )

ssh://github.com/<username>/<project>.git  

or

https://github.com/<username>/<project>.git 

with

git@github.com:<username>/<project> 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -