sI find a similar thread[1], but its problem is different from mine. My 
problem is when trying to replace old origin with the new one with the 

    git remote set-url origin https://...

git complains `error: could not lock config file .git/config: Permission 
denied`. All solutions 
found online suggest changing with `chown`. But that's not the case because all 
dirs under the 
directory with user and group configured are with my account e.g. 

My account is <my user>, and group is <my group>. Source dir called my-project 
is stored under /path/to/parent-project.

`ls -alh` parent project dir shows

    drwxrwxr-x 16 <my user> <my group> 4.0K Sep 27 11:17 <parent-project>

And ls -alh my-project shows   

    dr-x------ 10 <my user> <my group> 4.0K Sep 27 10:57 <my src directory>    
    -r-x------  1 <my user> <my group>   23 Sep 27 10:57 <my file in git>

All are configured with <my user> and <my group> recursively.  

How can I fix this? Anything I may miss that need to check? 


My environment: 

    - git version 2.7.4
    - Ubuntu 16.04 LTS


You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to