Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission Denied #44

Open
leonurium opened this issue Nov 4, 2020 · 3 comments
Open

Permission Denied #44

leonurium opened this issue Nov 4, 2020 · 3 comments

Comments

@leonurium
Copy link

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

@jsanbae
Copy link

jsanbae commented Dec 17, 2020

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.
    

@UBT-FJ
Copy link

UBT-FJ commented Apr 22, 2021

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!

@jonasnapoles
Copy link

jonasnapoles commented Mar 27, 2022

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

sudo su

git pull

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants