git-deploy
git-deploy copied to clipboard
Pull failed - permission denied
Hi,
I am getting this error, when call "git pull" from script:
=== ERROR: Pull failed using GIT /usr/bin/git
and DIR /home/****/public_html/test.****.de/
===
Permission denied (publickey).
fatal: Could not read from remote repository.
But when I execute "git pull" via ssh console, I dont get this error and the pull will execute.
I checked the user calling the script. It's the same user I'm signed in with via ssh.
Has anyone an idea?
have you solve this problem ?
Open a terminal window and cd to the repository dir then run (Hidden files are not included in the original change to update the repo dir) Also confirm the SSH key has been added into the git provider of choice e.g. gitlab > user > SSH Keys
sudo chown -R www-data:www-data .git
sudo chmod -R g+s .git
sudo chmod -R 775 .git
Also as a side not just incase you could also try
sudo service ssh restart