git-deploy
git-deploy copied to clipboard
Permission Denied
=== ERROR: Pull failed using GIT /usr/bin/git and DIR /var/www/html/repository ===
error: cannot open .git/FETCH_HEAD: Permission denied
This works for me:
- Open a terminal to the directory for your repository on the server.
-
run sudo chown -R yourusername:webserverusername .git to change the group of the repo. -
run sudo chmod -R g+s .git to make the group assignment inherited for new files/dirs. -
run sudo chmod -R 775 .git to set read & write for both owner and group.
I get the same error when I use the $user:www-data
When I use www:data:www:data I get the error [email protected]: Permission denied (publickey,keyboard-interactive). fatal: Could not read from remote repository.
I could not use the scripts!
I get the same error with Ubuntu command line. I managed to solve it, after logging in as root.
sudo su
git pull