Error Cannot Open .git/fetch_head Permission Denied
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or error cannot open .git/fetch_head permission denied windows posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss
Error Cannot Open .git/fetch_head Permission Denied Bundle
Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes error cannot open .git/fetch_head permission denied mac a minute: Sign up Trying to git pull with error: cannot open .git/FETCH_HEAD: Permission denied up vote 84 down vote favorite 22 Help me pls. I am run this in terminal asgard@asgard-A7N8X2-0:~/CollegePortal$ git pull error: cannot open .git/FETCH_HEAD: Permission denied fatal could not open '.git/commit_editmsg' permission denied Then I try this one asgard@asgard-A7N8X2-0:~/CollegePortal$ sudo git pull Permission denied (publickey). fatal: The remote end hung up unexpectedly Help me, I don't understand this problem. Thank you. git github pull share|improve this question edited Nov 2 '12 at 13:13 J. Steen 8,564103353 asked Nov 2 '12 at 13:06 Arthur Yakovlev 1,81131430 Have you added your public key to github account? –madhead Nov 2 '12 at 13:09 Do you have write permission for the local directory & files
Git Pull Error Cannot Open Git Fetch Head Permission Denied
where you try to do pull? Also, probably sudo doesn't help here at all since it needs access to you ssh keys (not root's). –Benjamin Bannier Nov 2 '12 at 13:09 add a comment| 12 Answers 12 active oldest votes up vote 79 down vote accepted It seems like the first one isn't working because your user doesn't have the permissions for changing that directory, and the second because your root user doesn't have the right SSH keys for accessing that git repository. Depending on what you're trying to do, it might be better to clone the repository to a different directory, or maybe chown the current directory to have full access for your user share|improve this answer answered Nov 2 '12 at 13:09 abyx 28.8k1268101 I am facing the similar issue and I am not sure if I can give my www-data user the permission to update the .git directory. I am calling the shell script using php over http in browser. Details here –KillABug Aug 21 '15 at 8:58 chown helps... –Tim Mar 14 at 1:08 add a comment| up vote 64 down vote Check if you have enough permissions on the .git/ directory. You should have write permissions. You can set them with the following command. Go to your project folder: chown -R youruser:yourgroup .git/ share|improve this answer edited Apr 8 '15 at 7:54 answered Nov 2 '12 at 13:10 Stony 14.2k123750 1
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us rvm error cannot open git fetch head permission denied Learn more about Stack Overflow the company Business Learn more about hiring developers or git merge fetch head posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow
Error: Cannot Open .git/fetch_head: Permission Denied Brew
Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error on git pull error : cannot open http://stackoverflow.com/questions/13195814/trying-to-git-pull-with-error-cannot-open-git-fetch-head-permission-denied .git/FETCH_HEAD: Permission denied up vote 1 down vote favorite I'm looking for help !! I am getting the following error message when trying to complete a git pull; C:\Jenkins\Repo> git pull error: cannot open .git/FETCH_HEAD: Permission denied The machine in question is Windows Server 2008 r2 OS and were using ssh to handle the authentication. We have tried the following; Checked that the current user the correct read/write http://stackoverflow.com/questions/32378984/error-on-git-pull-error-cannot-open-git-fetch-head-permission-denied on the FETCH_HEAD file, which it does, also checking that the user has the correct permissions set on the repo root. I have tried to load my private key (which I know 100% works and has permissions to the repo in question) and still the same issue... so from little I know regarding git I think this is more of a Windows issue and lots of Google ! Any more ideas on what to do/check would be a great help ! windows git jenkins cmd permission-denied share|improve this question asked Sep 3 '15 at 14:51 craig Rickett 6119 Do you have a FETCH_HEAD file? Can you delete it? (Running fetch will recreate it.) It's possible that another program has it open and git cannot recreate it. –Edward Thomson Sep 3 '15 at 16:09 add a comment| 3 Answers 3 active oldest votes up vote 1 down vote This is fairly a common problem. I've come across it many times and almost all of the times, the issue is with the right permissions to the repo/directory .git/ and the right SSH keys to access the git repository. You probably need to make the user, the owner of the
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about http://superuser.com/questions/334055/git-pulling-without-root-access Stack Overflow the company Business Learn more about hiring developers or posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top permission denied Git pulling without root access up vote 3 down vote favorite 1 On a Ubuntu Server 10.10 box, I seem to require root access to use git pull (in my /var/www directory). error: cannot open .git/FETCH_HEAD: Permission denied. I have tried chmodding 0777 /var/www and /var/www/.git, and chowning both of these to my account, to no avail. git chmod chown pull share|improve this question edited Oct 10 '11 at 17:39 studiohack♦ 10.8k1672108 error cannot open asked Sep 10 '11 at 9:03 JJJollyjim 252212 add a comment| 3 Answers 3 active oldest votes up vote 4 down vote The error message is not about /var/www or /var/www/.git. It is about /var/www/.git/FETCH_HEAD, which you need write permissions on. share|improve this answer answered Sep 10 '11 at 10:16 grawity 157k17289378 add a comment| up vote 1 down vote For whatever reason, you do not have access to the local file .git/FETCH_HEAD . The solution to this is to run chown -R youruser .git/ Once you run this, you should be able to run it without the sudo. share|improve this answer answered Jan 24 '15 at 1:24 Razi Shaban 112 add a comment| up vote 0 down vote You'll probably need permissions on the whole directory and all the files to be able to pull. share|improve this answer answered Sep 15 '11 at 20:02 Douglas Leeder 1,19069 add a comment| You must log in to answer this question. Not the answer you're looking for? Browse other questions tagged git chmod chown pull . asked 5 years ago viewed 9155 times active 1 year ago Related 1Git pull/fetch doesn't seem to work0git pull using shell script3How to install git on CentOS5 without root access?0how to go back after a bad git pull