Git pull error error:cannot open. Git/fetch_head:permission denied__git

Source: Internet
Author: User

When using Gitoite to manage Git libraries, make an error when using the admin account to git the Gitolite-admin warehouse pull operation

[Drpeng@srvser gitolite-admin]$ git pull
error:cannot open. Git/fetch_head:permission denied

The literal meaning is. git/fetch_head This file does not have permission to enter the. Git folder, view the permissions of this file, it is not true, it is very good to solve:

[Drpeng@srvser gitolite-admin]$ CD. Git
[drpeng@srvser. git]$ ll-h fetch_head
total dosage 48K
**-rw-r--r--   1 Root   root      0 September   7 2016 fetch_head**
[Drpeng@srvser. git]$ exit
logout
[root@srvser git]# CD/ Home/drpeng/git-13/gitolite-admin/.git
[Root@srvser. git]# chown-r drpeng.drpeng fetch_head
[Root@srvser . git]# Su-drpeng
[root@srvser git]# cd/home/drpeng/git-13/gitolite-admin/
[drpeng@srvser git-13]$ CD gitolite-admin/
[drpeng@srvser gitolite-admin]$ git pull
remote:counting objects:509, done.
Remote:compressing objects:100% (404/404), done.
Remote:total 499 (Delta), reused 0 (Delta 0)
receiving objects:100% (499/499), 53.32 KiB, done.
Resolving deltas:100% (125/125), done.

Above, solve the problem ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.