Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git cannot open .git/FETCH_HEAD

I have CentOs. I make git and made owner's .git folders group "gitdevelopers". In group "gitdevelopers" add User1 and User2. Now i make git-push and git-pull change from user1 and user2. But users in your computers not work with error:

git.exe pull -v --no-rebase --progress "origin" error: cannot open .git/FETCH_HEAD: Permission denied

Why?

p.s.:And i can connect to server by x-shell with login-password user1 and user2.

few hours later:: I think problem in not right login-password, which git remember.

p.p.s: where git save login-password pairs? I use ssh-protocol.

p.p.p.s.:OK. I have server CentOs with git. On server is two users. And I use TortoiseGit for windows. I configure this so : in each connect system asked login and password for connect to server. And now I wanted know : 1. where is saved this login-password 2. i can permanently saved this pair?

like image 653
Helen Avatar asked Mar 16 '15 09:03

Helen


People also ask

How to fix error Cannot open Git FETCH_ HEAD permission denied?

git/FETCH_HEAD: Permission denied” error occurs when you try to pull code from a remote repository when the . git/ directory in your project folder is inaccessible to your current user. To solve this error, make sure that your current user has read-write privileges to the Git repository with which you are working.

What is Fetch_head in Git?

FETCH_HEAD is a short-lived ref, to keep track of what has just been fetched from the remote repository. git pull first invokes git fetch , in normal cases fetching a branch from the remote; FETCH_HEAD points to the tip of this branch (it stores the SHA1 of the commit, just as branches do).


1 Answers

This worked with me

sudo chown -R $(whoami) .git/
like image 145
Pablo Papalardo Avatar answered Sep 20 '22 03:09

Pablo Papalardo