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 
command

    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? 

Thanks

My environment: 

    - git version 2.7.4
    
    - Ubuntu 16.04 LTS

[1.] 
https://groups.google.com/forum/?fromgroups#!searchin/git-users/error$3A$20could$20not$20lock$20config$20file$20.git$2Fconfig$3A$20Permission$20denied%7Csort:date/git-users/PVagUpsDqCM/_Z4kelXLZ2MJ

-- 
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 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to