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?
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.
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).
This worked with me
sudo chown -R $(whoami) .git/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With