Error: "Unable to connect to cache daemon: Permission denied" when not using SUDO

Asked

Viewed 180 times

0

I used that command git config --global credential.helper cache to store the login cache in bitbucket when git pull in production.

Everything works perfectly when I use the command sudo git pull, but I would like to use without the sudo, since the permissions of the downloaded files are getting like root.

However, when doing the command without using sudo, the following message appears:

fatal: Unable to connect to cache daemon: Permission denied

I’m guessing this has something to do with a folder git is not allowed to write without using sudo before.

How to solve this?

The operating system I’m using is the Ubuntu 14.04.5 LTS

1 answer

4


Really, the problem is with folder permission.

Just run the following command to resolve:

sudo chown $(whoami) ~/.git-credential-cache/
  • Thanks, I also had to run the following command and it Works. chmod 0700 /home/<user>/. git-Credential-cache

Browser other questions tagged

You are not signed in. Login or sign up in order to post.