andy jones
andy jones

Reputation: 922

Git deployment from bitbucket

Im not exactly new to git, i've used it for quite a few projects. However i am pretty new to deploying to bitbucket & then making the site live from there.

I've seen a few questions like this, but every time i clone my repo from bitbucket (its a wordpress install) i get a server error 500. All the other answers i've seen haven't helped me.

im using:

git clone [email protected]:teamname/gitproject.git .

It pulls it all fine, and then any modifications i do locally and push to bitbucket it can pull fine.. The only problem is i get a server error 500....

It works locally, so im stumped. If anyone could help that would be cool.

Thanks

Upvotes: 1

Views: 289

Answers (1)

andy jones
andy jones

Reputation: 922

I found the answer to my question by tinkering. Because i was logged into SSH as root, it was cloning the repository as root. So all files were owned by root and group root.

I fixed it using an chown in the post-recieve hook:

chown -R USERNAME:GROUP ./*

If anyone else has this problem, you might also want to check your Read Write on your files to make sure they aren't all 777.

Upvotes: 1

Related Questions