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

0

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

Everything works perfectly when I use the sudo git pull command, however I'd like to use it without sudo , since the permissions of downloaded files are getting as root .

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

  

fatal: unable to connect to cache daemon: Permission denied

I suppose this has to do with some folder that 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     

asked by anonymous 22.06.2018 / 20:24

1 answer

3

Actually, the problem is with folder permission.

Just run the following command to resolve:

sudo chown $(whoami) ~/.git-credential-cache/
    
22.06.2018 / 20:30