Git stash permission denied on production server -


i tried git stash on production server using 'deploy' user, gives error

/usr/lib/git-core/git-stash: 440: cannot create /app/app_name/.git/logs/refs/stash: permission denied 

the error doesn't show 'root' user.

what reason error , how resolve ?

it depends on how have created repo.
try repo created git init --shared, in order multiple users of same group able access , write in repo.

--shared[=(false|true|umask|group|all|world|everybody|0xxx)] 

specify git repository shared amongst several users.
allows users belonging same group push repository. when specified, config variable "core.sharedrepository" set files , directories under $git_dir created requested permissions.
when not specified, git use permissions reported umask(2).

you find more in "using git without sudo in many accounts".

for current repo, make sure deploy has right access /app/app_name/.git.

the op rtcoms confirms:

3 files owned root user. , did work.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -