git-deploy icon indicating copy to clipboard operation
git-deploy copied to clipboard

Permission Denied

Open leonurium opened this issue 5 years ago • 3 comments

=== ERROR: Pull failed using GIT /usr/bin/git and DIR /var/www/html/repository === error: cannot open .git/FETCH_HEAD: Permission denied

leonurium avatar Nov 04 '20 03:11 leonurium

This works for me:

  1. Open a terminal to the directory for your repository on the server.
  2. run sudo chown -R yourusername:webserverusername .git to change the group of the repo.
    
  3. run sudo chmod -R g+s .git to make the group assignment inherited for new files/dirs.
    
  4. run sudo chmod -R 775 .git to set read & write for both owner and group.
    

jsanbae avatar Dec 17 '20 13:12 jsanbae

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!

UBT-FJ avatar Apr 22 '21 13:04 UBT-FJ

I get the same error with Ubuntu command line. I managed to solve it, after logging in as root.

sudo su

git pull

jonasnapoles avatar Mar 27 '22 18:03 jonasnapoles