Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git pull permission denied linux?

Tags:

git

linux

ubuntu

When I run git pull origin test, I get

fatal: unable to connect to cache daemon: Permission denied

followed by the prompt for the github username and password. The directory is located under my homefolder (~/www/software). Any ideas? If I use sudo, it works, but I don't feel like I should have to use su within my own home folder!

Here is the result of ls -l:

drwxrwxrwx 48 root    root      53248 Jan  3 12:10 application
-rw-rw-r--  1 andrewr andrewr 1458793 Jan  2 10:09 a.txt
-rw-rw-r--  1 andrewr andrewr     186 Jan  2 10:09 Desktop.ini
-rw-rw-r--  1 andrewr andrewr    1406 Jan  2 10:10 favicon.ico
-rw-rw-r--  1 andrewr andrewr    6858 Jan  2 10:10 fb.jpg
-rw-rw-r--  1 andrewr andrewr       2 Jan  2 10:10 format
-rw-rw-r--  1 andrewr andrewr     398 Jan  2 10:10 index.php
-rw-rw-r--  1 andrewr andrewr   16572 Jan  2 10:10 license.txt
-rw-rw-r--  1 andrewr andrewr    1390 Jan  2 10:10 loginscreen.php
-rw-rw-r--  1 andrewr andrewr    6424 Jan  2 10:10 md5_login.js
-rw-rw-r--  1 andrewr andrewr      65 Jan  2 10:10 phpinfo.php
-rw-rw-r--  1 andrewr andrewr    9202 Jan  2 10:10 readme.html
-rw-rw-r--  1 andrewr andrewr     101 Jan  2 10:09 README.md
-rw-rw-r--  1 andrewr andrewr     229 Jan  2 10:09 README.txt
-rw-rw-r--  1 andrewr andrewr  180467 Jan  2 10:10 svn.ico
-rw-rw-r--  1 andrewr andrewr      71 Jan  2 10:10 test.php
-rw-rw-r--  1 andrewr andrewr   46080 Jan  2 10:09 Thumbs.db
-rw-rw-r--  1 andrewr andrewr    4268 Jan  2 10:10 wp-activate.php
drwxrwxrwx  9 root    root       4096 Jan  2 10:10 wp-admin
-rw-rw-r--  1 andrewr andrewr   40272 Jan  2 10:10 wp-app.php
-rw-rw-r--  1 andrewr andrewr     274 Jan  2 10:10 wp-blog-header.php
-rw-rw-r--  1 andrewr andrewr    3982 Jan  2 10:10 wp-comments-post.php
-rw-rw-r--  1 andrewr andrewr    3444 Jan  2 10:10 wp-config.php
-rw-rw-r--  1 andrewr andrewr    3087 Jan  2 10:10 wp-config-sample.php
drwxrwxrwx  6 root    root       4096 Jan  2 10:10 wp-content
-rw-rw-r--  1 andrewr andrewr    2684 Jan  2 10:10 wp-cron.php
drwxrwxrwx  8 root    root       4096 Jan  2 10:10 wp-includes
-rw-rw-r--  1 andrewr andrewr    1997 Jan  2 10:10 wp-links-opml.php
-rw-rw-r--  1 andrewr andrewr    2546 Jan  2 10:10 wp-load.php
-rw-rw-r--  1 andrewr andrewr   27695 Jan  2 10:10 wp-login.php
-rw-rw-r--  1 andrewr andrewr    7777 Jan  2 10:10 wp-mail.php
-rw-rw-r--  1 andrewr andrewr     413 Jan  2 10:10 wp-pass.php
-rw-rw-r--  1 andrewr andrewr     334 Jan  2 10:10 wp-register.php
-rw-rw-r--  1 andrewr andrewr    9913 Jan  2 10:10 wp-settings.php
-rw-rw-r--  1 andrewr andrewr   18545 Jan  2 10:10 wp-signup.php
-rw-rw-r--  1 andrewr andrewr    3702 Jan  2 10:10 wp-trackback.php
-rw-rw-r--  1 andrewr andrewr    1834 Jan  2 10:10 x.htaccess.bak
-rw-rw-r--  1 andrewr andrewr    3266 Jan  2 10:10 xmlrpc.php

Almost all of the changes are made within the application folder

like image 561
Andrew Rhyne Avatar asked Jan 03 '13 19:01

Andrew Rhyne


1 Answers

The problem is that git is unable to connect to its credential cache (Read http://git-scm.com/docs/git-credential-cache for more information).

From documentation:

The cache is accessible over a Unix domain socket, restricted to the current user by filesystem permissions.

So all you need is to check a file permission for this domain socket. Usually it is placed in ~/.git-credential-cache/socket and change them to make it accessible by andrewr user.

like image 99
Alexandr Priymak Avatar answered Oct 10 '22 04:10

Alexandr Priymak